Re: Parsing q-values
Bill Moseley <[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.lwp |
|---|---|
| Message-ID | <[email protected]> |
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 [email protected]