8000 Bugfix/esp8266 http client by Jeroen88 · Pull Request #5250 · esp8266/Arduino · GitHub
[go: up one dir, main page]

Skip to content

Bugfix/esp8266 http client #5250

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Oct 21, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Removed _client->stop() from destructor; some minor changes
  • Loading branch information
Jeroen88 committed Oct 10, 2018
commit 3a10f93a981a67a990b9142bcfd924d417af3eba
15 changes: 8 additions & 7 deletions libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ HTTPClient::HTTPClient()
HTTPClient::~HTTPClient()
{
if(_client) {
_client->stop();
DEBUG_HTTPCLIENT("[HTTP-Client][~HTTPClient] end() not called before destruction of HTTPClient\n");
}
if(_currentHeaders) {
delete[] _currentHeaders;
Expand Down Expand Up @@ -196,7 +196,7 @@ bool HTTPClient::begin(WiFiClient &client, String host, uint16_t port, String ur
#ifdef HTTPCLIENT_1_1_COMPATIBLE
bool HTTPClient::begin(String url, String httpsFingerprint)
{
if(_client) _canReuse = false;
_canReuse = false;
end();

_port = 443;
Expand All @@ -214,7 +214,7 @@ bool HTTPClient::begin(String url, String httpsFingerprint)

bool HTTPClient::begin(String url, const uint8_t httpsFingerprint[20])
{
if(_client) _canReuse = false;
_canReuse = false;
end();

_port = 443;
Expand All @@ -237,7 +237,7 @@ bool HTTPClient::begin(String url, const uint8_t httpsFingerprint[20])
*/
bool HTTPClient::begin(String url)
{
if(_client) _canReuse = false;
_canReuse = false;
end();

_port = 80;
Expand Down Expand Up @@ -299,7 +299,7 @@ bool HTTPClient::beginInternal(String url, const char* expectedProtocol)
#ifdef HTTPCLIENT_1_1_COMPATIBLE
bool HTTPClient::begin(String host, uint16_t port, String uri)
{
if(_client) _canReuse = false;
_canReuse = false;
end();

clear();
Expand All @@ -325,7 +325,7 @@ bool HTTPClient::begin(String host, uint16_t port, String uri, bool https, Strin

bool HTTPClient::begin(String host, uint16_t port, String uri, String httpsFingerprint)
{
if(_client) _canReuse = false;
_canReuse = false;
end();

clear();
Expand All @@ -343,7 +343,7 @@ bool HTTPClient::begin(String host, uint16_t port, String uri, String httpsFinge

bool HTTPClient::begin(String host, uint16_t port, String uri, const uint8_t httpsFingerprint[20])
{
if(_client) _canReuse = false;
_canReuse = false;
end();

clear();
Expand All @@ -367,6 +367,7 @@ bool HTTPClient::begin(String host, uint16_t port, String uri, const uint8_t htt
*/
void HTTPClient::end(void)
{
_canReuse = false;
disconnect();
clear();
}
Expand Down
0