Browse Source

Add CRLF between JUCE http headers and user http headers

tags/2021-05-28
hogliux 9 years ago
parent
commit
bb56ba4276
1 changed files with 8 additions and 7 deletions
  1. +8
    -7
      modules/juce_core/native/juce_linux_Network.cpp

+ 8
- 7
modules/juce_core/native/juce_linux_Network.cpp View File

@@ -429,14 +429,15 @@ private:
writeValueIfNotPresent (header, userHeaders, "Connection:", "close"); writeValueIfNotPresent (header, userHeaders, "Connection:", "close");
if (isPost) if (isPost)
{
writeValueIfNotPresent (header, userHeaders, "Content-Length:", String ((int) postData.getSize())); writeValueIfNotPresent (header, userHeaders, "Content-Length:", String ((int) postData.getSize()));
header << userHeaders << "\r\n" << postData;
}
else
{
header << "\r\n" << userHeaders << "\r\n";
}
if (userHeaders.isNotEmpty())
header << "\r\n" << userHeaders;
header << "\r\n";
if (isPost)
header << postData;
return header.getMemoryBlock(); return header.getMemoryBlock();
} }


Loading…
Cancel
Save