From cde7ea87cf937d38cf56225ef4577377af940f81 Mon Sep 17 00:00:00 2001 From: Alex Rousskov Date: Wed, 16 Apr 2014 15:58:08 -0600 Subject: [PATCH] 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. --- src/anyp/PortCfg.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.47.3