Skip to content

Commit 8ea4b9d

Browse files
authored
Merge pull request #626 from arduino/set-hostname
HttpsRequest: Set hostname from url
2 parents e4e06e4 + 0fb960e commit 8ea4b9d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

libraries/SocketWrapper/src/utility/https_request.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,11 @@ class HttpsRequest : public HttpRequestBase {
6161

6262
_socket = new TLSSocket();
6363
((TLSSocket*)_socket)->open(network);
64+
((TLSSocket*)_socket)->set_hostname(_parsed_url->host());
6465
if (ssl_ca_pem)
6566
((TLSSocket*)_socket)->set_root_ca_cert(ssl_ca_pem);
6667
else
67-
((TLSSocket*)_socket)->set_root_ca_cert_path("/wlan/");
68+
((TLSSocket*)_socket)->set_root_ca_cert_path("/wlan");
6869
_we_created_socket = true;
6970
}
7071

0 commit comments

Comments
 (0)