]> git.ipfire.org Git - thirdparty/squid.git/commit
Author: Alex Rousskov <rousskov@measurement-factory.com>
authorAmos Jeffries <amosjeffries@squid-cache.org>
Tue, 10 Aug 2010 02:51:49 +0000 (20:51 -0600)
committerAmos Jeffries <amosjeffries@squid-cache.org>
Tue, 10 Aug 2010 02:51:49 +0000 (20:51 -0600)
commit1b2e78d5442c354c97eb908da0bf0fcb8f86383f
treec4ff6650d755a0c17e25856dac935b9437fe4d54
parent04c6f6c989fb0083b3b10adfe2f438b6781c43bd
Author: Alex Rousskov <rousskov@measurement-factory.com>
HTTP/1.1 Compliance: Improved HTTP Range header field validation.

1) Improved HttpHdrRangeSpec::parseInit() to parse syntactically valid
range specs:

  * Suffix ranges with 0 length (i.e. -0) are syntactically valid.

  * Check that last-byte-pos is greater than or equal to first-byte-pos.

After the change, HttpHdrRangeSpec::parseInit() successfully parses suffix
ranges with 0 length. They were rejected before. RFC 2616 section 14.35.1 says
such range specs are syntactically valid but unsatisfiable. Thus, we should
ignore the range spec itself, but not the whole range header. These range
specs will be rejected later, during canonization.

2) In HttpHdrRangeSpec::parseInit(), ignore the whole range header if one of
range specs is syntactically invalid (i.e. range spec parsing fails).

Co-Advisor test case: test_clause/rfc2616/invalidRange
src/HttpHdrRange.cc