1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-12 01:53:07 +03:00

include non-standard ports in Host: header

This commit is contained in:
b-pas
2016-05-07 10:56:24 -04:00
parent a2b82ed6b6
commit 74bd4f9200

View File

@ -844,8 +844,13 @@ bool HTTPClient::sendHeader(const char * type)
header += "1";
}
header += String(F("\r\nHost: ")) + _host +
F("\r\nUser-Agent: ") + _userAgent +
header += String(F("\r\nHost: ")) + _host;
if (_port != 80 && _port != 443)
{
header += ':';
header += String(_port);
}
header += String(F("\r\nUser-Agent: ")) + _userAgent +
F("\r\nConnection: ");
if(_reuse) {