Parsing q-values

Parsing q-values

am 29.04.2006 16:51:41 von moseley

Is there any existing code for parsing the q-values. For example, to
get a list of Accept-Encoding values ordered by their "q" values?


--
Bill Moseley
moseley@hank.org

Re: Parsing q-values

am 29.04.2006 16:55:13 von derhoermi

* Bill Moseley wrote:
>Is there any existing code for parsing the q-values. For example, to
>get a list of Accept-Encoding values ordered by their "q" values?

HTTP::Negotiate?
--
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/

Re: Parsing q-values

am 01.05.2006 01:01:34 von moseley

On Sat, Apr 29, 2006 at 04:55:13PM +0200, Bjoern Hoehrmann wrote:
> * Bill Moseley wrote:
> >Is there any existing code for parsing the q-values. For example, to
> >get a list of Accept-Encoding values ordered by their "q" values?
>
> HTTP::Negotiate?

Maybe I'm looking for something simpler.

Instead of giving choose() a list of optional formats, I only want to
see if the client accepts a given encoding. This is to update a
Catalyst plugin that supports deflate and gzip encoding. Currently,
the plugin (or really the application coder) decides which to look for
first. So, I'd like to try and respect the order that the client
indicates in the Accept-Encoding headers (including q values, if
used).

I realize content negotiation is a bit more complex than this.


--
Bill Moseley
moseley@hank.org