From 8f4e29cc85862565fa88c9ceb873da351184c75d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Nordheim?= Date: Mon, 26 Jun 2023 16:11:03 +0200 Subject: [PATCH] http2: Use QByteArrayView in lambda where we only parse Thinking back I'm 99% certain I deliberately used QBA because I was going to cherry-pick it back and didn't feel like dealing with failing builds. Coming up we will have a lot of other changes here so let's change this as well. Change-Id: Ifc60ad8ee2a1e5b75ac766b4a8b7e1559f80e942 Reviewed-by: Edward Welbourne Reviewed-by: Konrad Kujawa --- src/network/access/qhttp2protocolhandler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/network/access/qhttp2protocolhandler.cpp b/src/network/access/qhttp2protocolhandler.cpp index f8b728a85ef..fe5d7ae9ceb 100644 --- a/src/network/access/qhttp2protocolhandler.cpp +++ b/src/network/access/qhttp2protocolhandler.cpp @@ -1127,9 +1127,9 @@ void QHttp2ProtocolHandler::updateStream(Stream &stream, const HPack::HttpHeader } } - const auto handleAuth = [&, this](const QByteArray &authField, bool isProxy) -> bool { + const auto handleAuth = [&, this](QByteArrayView authField, bool isProxy) -> bool { Q_ASSERT(httpReply); - const auto auth = authField.trimmed(); + const QByteArrayView auth = authField.trimmed(); if (auth.startsWith("Negotiate") || auth.startsWith("NTLM")) { // @todo: We're supposed to fall back to http/1.1: // https://docs.microsoft.com/en-us/iis/get-started/whats-new-in-iis-10/http2-on-iis#when-is-http2-not-supported