]> git.ipfire.org Git - thirdparty/squid.git/commit
Bug 1961: pt1: URL handling redesign
authorAmos Jeffries <squid3@treenet.co.nz>
Sun, 27 Apr 2014 07:59:17 +0000 (00:59 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 27 Apr 2014 07:59:17 +0000 (00:59 -0700)
commit4e3f4dc76d5d21fdc0a17c7f04b6e86ca3d1a382
tree5e02e36f48140c7ed3177c55243753a4fc127561
parentc113986ed8b0c282b723e51d8b243a8ddc951019
Bug 1961: pt1: URL handling redesign

Replace the HttpMsg::protocol member (only used by HttpRequest) with a
class URL member HttpRequest::url. To do this we adjust the class URL
scheme_ member to be mutable via the makeScheme() setter, and add a
clear() method to reset its internal state. These are necessary for
HttpRequest init() and initHTTP() mechanisms, but fiddling with the
scheme should be avoided as much as possible.

Remove the hack of forcing internal requests to http:// for processing
and cache lookup, then to internal:// for FwdState. Instead use the
available flags.internal for requests identified to be served by this proxy.

Drop the non-standard and now meaningless "internal://" scheme.

Add debugging to display what internal indicators are detected and when
the internal*() server and CacheManager are used by FwdState.

Also document HttpMsg::http_ver which is a copy of the HTTP-Version
field in the "on-wire" message syntax. It is unrelated to the socket
transport protocol and the URL scheme protocol.
24 files changed:
src/FwdState.cc
src/HttpMsg.cc
src/HttpMsg.h
src/HttpReply.cc
src/HttpRequest.cc
src/HttpRequest.h
src/URL.h
src/acl/Protocol.cc
src/adaptation/ecap/Host.cc
src/adaptation/ecap/MessageRep.cc
src/anyp/ProtocolType.h
src/carp.cc
src/cf.data.pre
src/client_side.cc
src/client_side_reply.cc
src/client_side_request.cc
src/errorpage.cc
src/external_acl.cc
src/ftp.cc
src/http.cc
src/internal.cc
src/peer_select.cc
src/tests/testHttpRequest.cc
src/url.cc