Simon Fell > Its just code > http compression revisited

Monday, November 24, 2003

I've been revisiting HTTP compression recently by adding support for gzip to the existing deflate support in pocketHTTP (why gzip is more popular I don't know, a deflate response is always smaller). This reminded me of one of the annoying things about this, is that there's no way to discover if the server supports a compressed request. I was thinking about a WSDL extension to indicate this, but as its a HTTP level thing I think it'd be better to stay within HTTP land, it would be nice if the server could include an Accept-Encoding header in its response, the client could then on subsequent requests to that URL encode the POST data according, but looking at the HTTP spec, this doesn't look legal. Does anyone know of any extensions in this space ? How about if the server returned an X-Accept-Encoding header, that should be enough, right ?