curl-users
Re: Change Accept-Encoding order?
Date: Sat, 10 Apr 2010 13:20:38 +0200 (CEST)
On Sat, 10 Apr 2010, Simon Lyall wrote:
> Accept-Encoding: deflate, gzip
>
> I was wondering if the order could be reversed? Since IE and Firefox (at
> least ) send "gzip, deflate" when they request pages and (it appears) the
> defacto standard is for the server to serve up the first match.
It's not a standard and it isn't a defacto one either in my experience. I've
seen countless servers provide a gzip compressed content to such requests.
The relevant HTTP spec explains how to give preference to what method to
select, and the order is not mentioned as a factor. Given two algorithms with
the equal "qvalue", it is up to the server to pick which one to use. The most
specific and detailed way would probably be:
Accept-Encoding: compress;q=0.5, gzip;q=1.0
Of course you can easily set your own order and header by using -H.
Possibly we should stop having curl sending deflate completely.
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-users FAQ: http://curl.haxx.se/docs/faq.html Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2010-04-10