From: Amos Jeffries Date: Sat, 7 Jan 2012 05:58:20 +0000 (-0700) Subject: Cleanup: de-duplicate internal URL detection X-Git-Tag: SQUID_3_2_0_15~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=31f66c2146b6a785c3a6eb3ae648ac1eaa863031;p=thirdparty%2Fsquid.git Cleanup: de-duplicate internal URL detection --- diff --git a/src/client_side.cc b/src/client_side.cc index 47c15f2415..aecd11c0ad 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -2023,15 +2023,6 @@ prepareAcceleratedURL(ConnStateData * conn, ClientHttpRequest *http, char *url, url = (char *) "/"; } - if (internalCheck(url)) { - /* prepend our name & port */ - http->uri = xstrdup(internalLocalUri(NULL, url)); - // We just re-wrote the URL. Must replace the Host: header. - // But have not parsed there yet!! flag for local-only handling. - http->flags.internal = 1; - return; - } - if (vport < 0) vport = http->getConn()->clientConnection->local.GetPort(); @@ -2280,15 +2271,17 @@ parseHttpRequest(ConnStateData *csd, HttpParser *hp, HttpRequestMethod * method_ /* intercept or transparent mode, properly working with no failures */ prepareTransparentURL(csd, http, url, req_hdr); - } else if (csd->port->accel || csd->switchedToHttps()) { - /* accelerator mode */ - prepareAcceleratedURL(csd, http, url, req_hdr); - } else if (internalCheck(url)) { /* internal URL mode */ /* prepend our name & port */ http->uri = xstrdup(internalLocalUri(NULL, url)); - http->flags.accel = 1; + // We just re-wrote the URL. Must replace the Host: header. + // But have not parsed there yet!! flag for local-only handling. + http->flags.internal = 1; + + } else if (csd->port->accel || csd->switchedToHttps()) { + /* accelerator mode */ + prepareAcceleratedURL(csd, http, url, req_hdr); } if (!http->uri) {