Skip to content

Commit

Permalink
HTTPClient: fix default port not being set
Browse files Browse the repository at this point in the history
  • Loading branch information
igrr committed Apr 25, 2016
1 parent 81d3bb3 commit edaae2c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ void HTTPClient::clear()
bool HTTPClient::begin(String url, String httpsFingerprint)
{
_transportTraits.reset(nullptr);
_port = 443;
if (httpsFingerprint.length() == 0) {
return false;
}
Expand All @@ -116,6 +117,7 @@ bool HTTPClient::begin(String url, String httpsFingerprint)
bool HTTPClient::begin(String url)
{
_transportTraits.reset(nullptr);
_port = 80;
if (!beginInternal(url, "http")) {
return false;
}
Expand Down

1 comment on commit edaae2c

@ZachreyNM
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I copy all of this and replace all of the BasicHTTPClient.ino code with this?

Please sign in to comment.