------------------------------------------------------------ revno: 13359 revision-id: rousskov@measurement-factory.com-20140416215808-1298nx9q10dcy6ag parent: rousskov@measurement-factory.com-20140416212212-fef1tf8qqs7piz8h committer: Alex Rousskov branch nick: trunk timestamp: Wed 2014-04-16 15:58:08 -0600 message: Fixed PortCfg.transport setting broken in r12961 "Update the http(s)_port directives protocol= parameter" The port protocol became PROTO_HTTP regardless of the protocol name passed by the caller. The other allowed value (PROTO_HTTPS) could not be set. ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: rousskov@measurement-factory.com-20140416215808-\ # 1298nx9q10dcy6ag # target_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # testament_sha1: 8ed9efd1ca5ae64d48839e6635f2f7015446971d # timestamp: 2014-04-16 22:53:48 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # base_revision_id: rousskov@measurement-factory.com-20140416212212-\ # fef1tf8qqs7piz8h # # Begin patch === modified file 'src/anyp/PortCfg.cc' --- src/anyp/PortCfg.cc 2014-03-30 12:00:34 +0000 +++ src/anyp/PortCfg.cc 2014-04-16 21:58:08 +0000 @@ -187,10 +187,10 @@ // HTTP/1.0 not supported because we are version 1.1 which contains a superset of 1.0 // and RFC 2616 requires us to upgrade 1.0 to 1.1 - if (strcasecmp("http", aProtocol) != 0 || strcmp("HTTP/1.1", aProtocol) != 0) + if (strcasecmp("http", aProtocol) == 0 || strcmp("HTTP/1.1", aProtocol) == 0) transport = AnyP::ProtocolVersion(AnyP::PROTO_HTTP, 1,1); - else if (strcasecmp("https", aProtocol) != 0 || strcmp("HTTPS/1.1", aProtocol) != 0) + else if (strcasecmp("https", aProtocol) == 0 || strcmp("HTTPS/1.1", aProtocol) == 0) transport = AnyP::ProtocolVersion(AnyP::PROTO_HTTPS, 1,1); else