From: Alex Rousskov Date: Wed, 16 Apr 2014 21:58:08 +0000 (-0600) Subject: Fixed PortCfg.transport setting broken in r12961 X-Git-Tag: SQUID_3_5_0_1~286 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cde7ea87cf937d38cf56225ef4577377af940f81;p=thirdparty%2Fsquid.git 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. --- diff --git a/src/anyp/PortCfg.cc b/src/anyp/PortCfg.cc index ca810cc7ec..693ce6a36a 100644 --- a/src/anyp/PortCfg.cc +++ b/src/anyp/PortCfg.cc @@ -187,10 +187,10 @@ AnyP::PortCfg::setTransport(const char *aProtocol) // 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