mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Include port number in http request header if it is a non-standard port number (see HTTP spec 14.23)
This commit is contained in:
parent
9efbd199a6
commit
67436307bf
1 changed files with 5 additions and 1 deletions
|
|
@ -343,9 +343,13 @@ private:
|
|||
}
|
||||
|
||||
static void writeHost (MemoryOutputStream& dest, const bool isPost,
|
||||
const String& path, const String& host, int /*port*/)
|
||||
const String& path, const String& host, int port)
|
||||
{
|
||||
dest << (isPost ? "POST " : "GET ") << path << " HTTP/1.0\r\nHost: " << host;
|
||||
|
||||
/* HTTP spec 14.23 says that the port number must be included in the header if it is not 80 */
|
||||
if (port != 80)
|
||||
dest << ':' << port;
|
||||
}
|
||||
|
||||
static MemoryBlock createRequestHeader (const String& hostName, const int hostPort,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue