From: Amos Jeffries Date: Thu, 16 May 2019 15:22:54 +0000 (+0000) Subject: RFC 7230 forbids generation of userinfo subcomponent of https URL (#405) X-Git-Tag: SQUID_4_8~16 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=e1e861eb9a04137fe81decd1c9370b13c6f18a18;p=thirdparty%2Fsquid.git RFC 7230 forbids generation of userinfo subcomponent of https URL (#405) --- diff --git a/src/anyp/Uri.cc b/src/anyp/Uri.cc index c6d6836989..12b1aafd41 100644 --- a/src/anyp/Uri.cc +++ b/src/anyp/Uri.cc @@ -496,7 +496,7 @@ AnyP::Uri::absolute() const if (getScheme() != AnyP::PROTO_URN) { absolute_.append("//", 2); const bool omitUserInfo = getScheme() == AnyP::PROTO_HTTP || - getScheme() != AnyP::PROTO_HTTPS || + getScheme() == AnyP::PROTO_HTTPS || userInfo().isEmpty(); if (!omitUserInfo) { absolute_.append(userInfo());