Skip to content

Add 443 port for https requests #161

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
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion src/HttpClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ int HttpClient::sendInitialHeaders(const char* aURLPath, const char* aHttpMethod
{
iClient->print("Host: ");
iClient->print(iServerName);
if (iServerPort != kHttpPort)
if (iServerPort != kHttpPort && iServerPort != kHttpsPort)
{
iClient->print(":");
iClient->print(iServerPort);
Expand Down
1 change: 1 addition & 0 deletions src/HttpClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class HttpClient : public Client
public:
static const int kNoContentLengthHeader =-1;
static const int kHttpPort =80;
static const int kHttpsPort =443;
static const char* kUserAgent;

// FIXME Write longer API request, using port and user-agent, example
Expand Down