QHttpSocketEngine: The 'Connection' options are case insensitive

As noted in RFC7230 Section 6.1 the 'Connection' options are case
insensitive.

https://tools.ietf.org/html/rfc7230#section-6.1

Change-Id: I80b98d82eaa5572d38a6c3f99383bc059ec91c54
Fixes: QTBUG-76990
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
bb10
Mårten Nordheim 2019-07-12 10:26:35 +02:00
parent 7d3a55cbd2
commit 2a15ec72c0
1 changed files with 1 additions and 1 deletions

View File

@ -627,7 +627,7 @@ void QHttpSocketEngine::slotSocketReadNotification()
// from http spec is also allowed.
if (proxyConnectionHeader.isEmpty())
proxyConnectionHeader = d->reply->headerField("Connection");
if (proxyConnectionHeader.compare("close", Qt::CaseSensitive) == 0) {
if (proxyConnectionHeader.compare("close", Qt::CaseInsensitive) == 0) {
willClose = true;
} else if (proxyConnectionHeader.compare("keep-alive", Qt::CaseInsensitive) == 0) {
willClose = false;