mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-12 01:53:07 +03:00
Update ESP8266HTTPClient.cpp
The libb64 base64 library adds newlines to the base64 encoding of the encoded _base64Authorization String if the encoded string every 72 characters. This causes problems with the Authorization: Basic http header when the username and password are long. The change strips out newlines from _base64Authorization right before the header is sent.
This commit is contained in:
@ -865,6 +865,7 @@ bool HTTPClient::sendHeader(const char * type)
|
||||
}
|
||||
|
||||
if(_base64Authorization.length()) {
|
||||
_base64Authorization.replace("\n", "");
|
||||
header += F("Authorization: Basic ");
|
||||
header += _base64Authorization;
|
||||
header += "\r\n";
|
||||
|
Reference in New Issue
Block a user