From a5b74332c203701c90f57499feaa0e346dfa91b4 Mon Sep 17 00:00:00 2001 From: reuk Date: Thu, 17 Aug 2023 14:18:27 +0100 Subject: [PATCH] WebInputStream: Report all headers Status codes are already filtered in curlHeaderCallback, so there's no need to remove them again in parseHttpHeaders. Request headers will never include a status, so there's no need to remove the status in that case. --- modules/juce_core/network/juce_WebInputStream.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/modules/juce_core/network/juce_WebInputStream.cpp b/modules/juce_core/network/juce_WebInputStream.cpp index 1183c1bc72..71b58311a5 100644 --- a/modules/juce_core/network/juce_WebInputStream.cpp +++ b/modules/juce_core/network/juce_WebInputStream.cpp @@ -61,11 +61,8 @@ StringPairArray WebInputStream::parseHttpHeaders (const String& headerData) StringPairArray headerPairs; auto headerLines = StringArray::fromLines (headerData); - // ignore the first line as this is the status line - for (int i = 1; i < headerLines.size(); ++i) + for (const auto& headersEntry : headerLines) { - const auto& headersEntry = headerLines[i]; - if (headersEntry.isNotEmpty()) { const auto key = headersEntry.upToFirstOccurrenceOf (": ", false, false);