]> git.ipfire.org Git - thirdparty/squid.git/commit - src/adaptation/icap/ModXact.cc
Cleanup: replace urlCanonical() with HttpRequest::effectiveReuqestUri()
authorAmos Jeffries <squid3@treenet.co.nz>
Sun, 19 Jul 2015 13:23:01 +0000 (06:23 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 19 Jul 2015 13:23:01 +0000 (06:23 -0700)
commit851feda6490fd423979e170ea0e65af79a4bdd4a
treea747e6f5de403a02031b448b680e8e31f902803d
parentbd71ba998a48984741479fdf5577c4ccf70b878b
Cleanup: replace urlCanonical() with HttpRequest::effectiveReuqestUri()

We have previously been using the term "canonical URL" in Squid to mean
absolute-URI, but not in all cases and may sometimes mean authority-form.
RFC 7230 introduces a new term "Effective Request URI" which directly
matches our desired usage.

* make urlCanonical() global function a method of class HttpRequest
  since it depends on request method for its particular form syntax

* remove the now unnecessary canonical member and HttpRequest::SetHost()

* convert HttpRequest::storeId(), Ftp::UrlWith2f(), and ps_state::url()
  to SBuf usage to avoid performance regressions in their use.

* replace many uses of xstrdup() with xstrndup() for performance where
  the copy cannot be avoided entirely.

* avoid using urlParse() to do a simple URL data-copy in ICAP handling

* update stub_HttpRequest.cc to match full class HttpRequest API
29 files changed:
src/HttpRequest.cc
src/HttpRequest.h
src/PeerPoolMgr.cc
src/PeerSelectState.h
src/URL.h
src/acl/Url.cc
src/adaptation/ecap/MessageRep.cc
src/adaptation/icap/ModXact.cc
src/carp.cc
src/client_side.cc
src/client_side_reply.cc
src/client_side_request.cc
src/clients/Client.cc
src/clients/FtpGateway.cc
src/clients/forward.h
src/errorpage.cc
src/external_acl.cc
src/format/Format.cc
src/http.cc
src/icmp/net_db.cc
src/peer_select.cc
src/refresh.cc
src/ssl/PeerConnector.cc
src/ssl/ServerBump.cc
src/store_key_md5.cc
src/store_swapmeta.cc
src/tests/stub_HttpRequest.cc
src/tunnel.cc
src/url.cc