mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-19 23:22:16 +03:00
httpClient: prevent empty user-agent in header (#8411)
This commit is contained in:
parent
e5a214e6f1
commit
e3c79de7c9
@ -929,8 +929,10 @@ bool HTTPClient::sendHeader(const char * type)
|
|||||||
header += ':';
|
header += ':';
|
||||||
header += String(_port);
|
header += String(_port);
|
||||||
}
|
}
|
||||||
header += F("\r\nUser-Agent: ");
|
if (_userAgent.length()) {
|
||||||
header += _userAgent;
|
header += F("\r\nUser-Agent: ");
|
||||||
|
header += _userAgent;
|
||||||
|
}
|
||||||
|
|
||||||
if (!_useHTTP10) {
|
if (!_useHTTP10) {
|
||||||
header += F("\r\nAccept-Encoding: identity;q=1,chunked;q=0.1,*;q=0");
|
header += F("\r\nAccept-Encoding: identity;q=1,chunked;q=0.1,*;q=0");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user