]> git.ipfire.org Git - thirdparty/squid.git/commit
Fixed URI scheme case-sensitivity treatment broken since r14802.
authorAlex Rousskov <rousskov@measurement-factory.com>
Fri, 31 Mar 2017 12:06:22 +0000 (01:06 +1300)
committerAmos Jeffries <>
Fri, 31 Mar 2017 12:06:22 +0000 (01:06 +1300)
commitabdaf7f2dda7908b7f6a6f175626839dc2cd3176
tree0a22f67e1a114fe547d0f604b729e84e06e1f198
parent7278e7b7e1aea78fe21f900da7931dfd3ffaddda
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