1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-19 23:22:16 +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:
scottfitzenrider 2016-05-25 15:07:14 -04:00
parent 5313c56f24
commit 0ac37810ca

View File

@ -865,6 +865,7 @@ bool HTTPClient::sendHeader(const char * type)
} }
if(_base64Authorization.length()) { if(_base64Authorization.length()) {
_base64Authorization.replace("\n", "");
header += F("Authorization: Basic "); header += F("Authorization: Basic ");
header += _base64Authorization; header += _base64Authorization;
header += "\r\n"; header += "\r\n";