URL header suffix on Linux

I am having an issue on linux when sending post requests via the WebInputStream class. The linux specific implementation seems to be adding in an extra “\r\n” after my headers which causes my content-length parameter to be wrong and decoding to display an incorrect body.

On line 528 of juce_Network_linux.cpp we get this:

header << "\r\n\r\n";

which when changing to:

header << "\r\n";

fixes the issue. Is there any reason this has a double ending?

The reason turned out to be that HTTP headers should end with “\r\n\r\n” but my header content already ended with “\r\n” which caused “\r\n\r\n\r\n” I am creating a pull request to fix this issue