]> git.ipfire.org Git - thirdparty/squid.git/commit - src/carp.cc
Better support for unknown URL schemes
authorAmos Jeffries <squid3@treenet.co.nz>
Wed, 17 Aug 2016 00:38:25 +0000 (12:38 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Wed, 17 Aug 2016 00:38:25 +0000 (12:38 +1200)
commitd31d59d80a8ef8a2b85058fe6504188e43cee5ce
tree05a8cd4a41c669c18d892995de66610c3429103c
parent57542821bbcf08d46cc50b78d3461f01937e3b32
Better support for unknown URL schemes

Squid already contains AnyP::PROTO_UNKNOWN support for unknown protocols
but currently does not preserve the actual string value received for them.

This adds a textual representation ('image') to the UriScheme object to
fill that gap and ensure that all URL representations (ie cache keys,
logs and outgoing messages) are generated with the scheme string as it
was received rather than implicitly via a registered protocol type.

Future work:
* add ACL support for arbitrary scheme names
* support for comparisons of unknown schemes
15 files changed:
src/HttpRequest.cc
src/HttpRequest.h
src/PeerPoolMgr.cc
src/URL.h
src/anyp/UriScheme.cc
src/anyp/UriScheme.h
src/cache_cf.cc
src/carp.cc
src/client_side.cc
src/client_side_reply.cc
src/errorpage.cc
src/format/Format.cc
src/tests/stub_HttpRequest.cc
src/tests/testUriScheme.cc
src/url.cc