Browse Source

Workaround for bad HTTP response header parsing on Linux

tags/2021-05-28
James Hurst ed 6 years ago
parent
commit
a138458d19
1 changed files with 3 additions and 6 deletions
  1. +3
    -6
      modules/juce_core/native/juce_curl_Network.cpp

+ 3
- 6
modules/juce_core/native/juce_curl_Network.cpp View File

@@ -567,11 +567,7 @@ public:
size_t len = size * nmemb;
String header (ptr, len);
if (! header.contains (":") && header.startsWithIgnoreCase ("HTTP/"))
responseHeaders.clear();
else
responseHeaders += header;
responseHeaders += header;
return len;
}
@@ -621,7 +617,8 @@ public:
int64 contentLength = -1, streamPos = 0;
MemoryBlock curlBuffer;
MemoryBlock headersAndPostData;
String responseHeaders, requestHeaders;
String responseHeaders { "\r\n" }; // WebInputStream::parseHttpHeaders skips the first header line (assumes status)
String requestHeaders;
int statusCode = -1;
//==============================================================================


Loading…
Cancel
Save