ISA Server 2006 & HTTP Compression: No support for “Quality value” in “Accept-Encoding” header


When using the ISA Server 2006 in a web publishing scenario, the ISA Serbver 2006 can take care of compressing the content to reduce the number of bytes that needed to be send to the clients. Compression is especially advisable when serving JavaScript and CSS files because text-based files can be compressed with a very high compression ratio.

The compression filter is is described in Microsoft’s TechNet as follows:

This filter is responsible for compression and decompression of HTTP requests and responses. This filter has a high priority, and is high in the ordered list of Web filters. This is because the filter is responsible for decompression. Decompression must take place before any other Web filters inspect the content.

Recently, I found out that there might be a bug in this build-in compression filter, because ISA Server 2006 does not send compressed content to the clients, if the clients sends a “Quality value” for gzip in the “Accept-Encoding” header (see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.3). If the clients sends a “Quality value” for gzip, ISA Server 2006 seems to interpret this as “client does not support compression”. When I monitor the requests, the value for compression/client is set to “No”.

I used curl to examine the problem in detail and send different “Accept-Encoding” headers with the following results:

Accept-Encoding:gzip;q=1.000, deflate;q=0.999, identity;q=0.001
Compression/Client: No

> GET [...]
> User-Agent: curl/7.26.0
> Host: [...]
> Accept: */*
> Accept-Encoding:gzip;q=1.000, deflate;q=0.999, identity;q=0.001
>
< HTTP/1.1 200 OK
< Connection: Keep-Alive
< Content-Length: 549721
< Date: Tue, 24 Jul 2012 12:02:22 GMT
< Content-Type: application/x-javascript
< ETag: "0d9218f8d5fcd1:0"
< Cache-Control: max-age=604800
< Last-Modified: Wed, 11 Jul 2012 17:49:46 GMT
< Accept-Ranges: bytes
< Vary: Accept-Encoding

Accept-Encoding:gzip;q=1.000, deflate, identity
Compression/Client: No

> GET [...]
> User-Agent: curl/7.26.0
> Host: [...]
> Accept: */*
> Accept-Encoding:gzip;q=1.000, deflate, identity
>
< HTTP/1.1 200 OK
< Connection: Keep-Alive
< Content-Length: 549721
< Date: Tue, 24 Jul 2012 12:04:53 GMT
< Content-Type: application/x-javascript
< ETag: "0d9218f8d5fcd1:0"
< Cache-Control: max-age=604800
< Last-Modified: Wed, 11 Jul 2012 17:49:46 GMT
< Accept-Ranges: bytes
< Vary: Accept-Encoding

Accept-Encoding:gzip;q=1.000, deflate;q=0.001, identity;q=0.001
Compression/Client: No

> GET [...]
> User-Agent: curl/7.26.0
> Host: [...]
> Accept: */*
> Accept-Encoding:gzip;q=1.000, deflate;q=0.001, identity;q=0.001
>
< HTTP/1.1 200 OK
< Connection: Keep-Alive
< Content-Length: 549721
< Date: Tue, 24 Jul 2012 12:05:46 GMT
< Content-Type: application/x-javascript
< ETag: "0d9218f8d5fcd1:0"
< Cache-Control: max-age=604800
< Last-Modified: Wed, 11 Jul 2012 17:49:46 GMT
< Accept-Ranges: bytes
< Vary: Accept-Encoding

Accept-Encoding:gzip, deflate;q=0.001, identity;q=0.001
Compression/Client: Yes

> GET [...]
> User-Agent: curl/7.26.0
> Host: [...]
> Accept: */*
> Accept-Encoding:gzip, deflate;q=0.001, identity;q=0.001
>
< HTTP/1.1 200 OK
< Connection: Keep-Alive
< Transfer-Encoding: chunked
< Date: Tue, 24 Jul 2012 12:06:22 GMT
< Content-Type: application/x-javascript
< Content-Encoding: gzip
< ETag: "0d9218f8d5fcd1:0"
< Cache-Control: max-age=604800
< Last-Modified: Wed, 11 Jul 2012 17:49:46 GMT
< Accept-Ranges: bytes
< Vary: Accept-Encoding
< Vary: Accept-Encoding

Summarized: If the client sends a "Quality value" for gzip the ISA Server 2006 does not return a compressed response. I do not know if this is a bug or a feature in ISA Server 2006 and I opened a thread in the Microsoft Forefront Forum (Thread "ISA 2006 & HTTP Compression: Support for 'Quality value' in 'Accept-Encoding' header").


Leave a Reply

Your email address will not be published. Required fields are marked *