mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-07 16:23:38 +03:00
Merge pull request #2006 from b-pass/client-fix
Include non-standard ports in HTTPClient's Host header
This commit is contained in:
commit
61cc420cb8
@ -844,8 +844,13 @@ bool HTTPClient::sendHeader(const char * type)
|
|||||||
header += "1";
|
header += "1";
|
||||||
}
|
}
|
||||||
|
|
||||||
header += String(F("\r\nHost: ")) + _host +
|
header += String(F("\r\nHost: ")) + _host;
|
||||||
F("\r\nUser-Agent: ") + _userAgent +
|
if (_port != 80 && _port != 443)
|
||||||
|
{
|
||||||
|
header += ':';
|
||||||
|
header += String(_port);
|
||||||
|
}
|
||||||
|
header += String(F("\r\nUser-Agent: ")) + _userAgent +
|
||||||
F("\r\nConnection: ");
|
F("\r\nConnection: ");
|
||||||
|
|
||||||
if(_reuse) {
|
if(_reuse) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user