Ignore:
Timestamp:
Jul 13, 2017, 9:41:54 AM (4 years ago)
Author:
Juanma
Message:

Initial release

File:
1 edited

Legend:

Unmodified
Added
Removed
  • squid-ssl/trunk/fuentes/src/client_side.cc

    r5499 r5502  
    416416        break;
    417417
     418    case LOG_TCP_INM_HIT:
    418419    case LOG_TCP_IMS_HIT:
    419420        statCounter.client_http.nearMissSvcTime.count(svc_time);
     
    26612662            return;
    26622663        }
     2664
     2665        // when absolute-URI is provided Host header should be ignored. However
     2666        // some code still uses Host directly so normalize it.
     2667        // For now preserve the case where Host is completely absent. That matters.
     2668        if (request->header.has(HDR_HOST)) {
     2669            const char *host = request->header.getStr(HDR_HOST);
     2670            SBuf authority(request->GetHost());
     2671            if (request->port != urlDefaultPort(request->url.getScheme()))
     2672                authority.appendf(":%d", request->port);
     2673            debugs(33, 5, "URL domain " << authority << " overrides header Host: " << host);
     2674            // URL authority overrides Host header
     2675            request->header.delById(HDR_HOST);
     2676            request->header.putStr(HDR_HOST, authority.c_str());
     2677        }
    26632678    }
    26642679
Note: See TracChangeset for help on using the changeset viewer.