[PATCH] Compliance: remove Content-Length header if Transfer-Encoding is present

From: Alex Rousskov <rousskov_at_measurement-factory.com>
Date: Wed, 18 Aug 2010 22:02:25 -0600

Compliance: remove Content-Length header if Transfer-Encoding is present.

If after HTTP header parsing we have both "Transfer-Encoding: chunked"
and Content-Length headers, remove the Content-Length entry. The
adjusted behavior follows httpbis recommendations (ticket #95, part 2).

The old client-side code forwarded the original Content-Length header
which did not match the [dechunked] response, resulting in a malformed
response.

HttpHeader::chunked() method added to check if HTTP headers contain
chunked Transfer-Encoding header. Use this method in code that checks
for chunked encoding.

Co-Advisor test cases: test_case/rfc2616/chunked-1p0-badClen-toClt
                        test_case/rfc2616/chunked-1p1-badClen-toClt

Received on Thu Aug 19 2010 - 04:02:41 MDT

This archive was generated by hypermail 2.2.0 : Thu Aug 19 2010 - 12:00:04 MDT