HTTP and HTTPS library for Mbed OS 5
Dependents: RZ_A2M_Mbed_samples_20201012 RZ_A2M_Mbed_samples
Diff: source/http_request_builder.h
- Revision:
- 35:b3ee394d1d2e
- Parent:
- 32:fa4d71265625
--- a/source/http_request_builder.h Fri Jan 04 13:27:32 2019 +0100 +++ b/source/http_request_builder.h Fri Aug 09 09:58:57 2019 +0200 @@ -39,6 +39,12 @@ else if (strcmp(parsed_url->schema(), "https") == 0 && parsed_url->port() != 443) { host += string(port_str); } + else if (strcmp(parsed_url->schema(), "ws") == 0 && parsed_url->port() != 80) { + host += string(port_str); + } + else if (strcmp(parsed_url->schema(), "wss") == 0 && parsed_url->port() != 443) { + host += string(port_str); + } set_header("Host", host); }