]> git.ipfire.org Git - thirdparty/squid.git/commit - src/main.cc
Fixed URI scheme case-sensitivity treatment broken since r14802.
authorAlex Rousskov <rousskov@measurement-factory.com>
Fri, 3 Mar 2017 23:18:25 +0000 (16:18 -0700)
committerAlex Rousskov <rousskov@measurement-factory.com>
Fri, 3 Mar 2017 23:18:25 +0000 (16:18 -0700)
commit50a43a49966ff66fdb66befee01f3c2475e83832
treea2605d76c6135eeb90d1efe8bc23599148a4a502
parentf1ba1fba3f8da3a06496f200862b9201876ec013
Fixed URI scheme case-sensitivity treatment broken since r14802.

A parsed value for the AnyP::UriScheme image constructor parameter was
stored without toLower() canonicalization for known protocols (e.g.,
Squid would store "HTTP" instead of "http" after successfully parsing
"HTTP://EXAMPLE.COM/" in urlParseFinish()). Without that
canonicalization step, Squid violated various HTTP caching rules related
to URI comparison (and served fewer hits) when dealing with absolute
URLs containing non-lowercase HTTP scheme.

According to my limited tests, URL-based ACLs are not affected by this
bug, but I have not investigated how URL-based ACL code differs from
caching code when it comes to stored URL access and whether some ACLs
are actually affected in some environments.
src/anyp/UriScheme.cc
src/anyp/UriScheme.h
src/main.cc
src/tests/testHttpRequest.cc
src/tests/testURL.cc