1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

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.
This commit is contained in:
reuk 2023-08-17 14:18:27 +01:00
parent 308ae31810
commit a5b74332c2
No known key found for this signature in database
GPG key ID: FCB43929F012EE5C

View file

@ -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);