diff options
| author | tobtoht <tob@featherwallet.org> | 2025-02-17 16:04:22 +0000 |
|---|---|---|
| committer | tobtoht <tob@featherwallet.org> | 2025-02-17 16:04:22 +0000 |
| commit | 8b0113592710116a95a2e5503ebb6055315a5c96 (patch) | |
| tree | 1b4123816d0838dabadb0ee0c4d39a041f632f80 /contrib | |
| parent | 1c1b828551e2dd6aee9f92e7281d6406a93d1ab6 (diff) | |
| parent | 322953e6264cc5ae47350244697ae39d03406117 (diff) | |
| download | monzero-core-8b0113592710116a95a2e5503ebb6055315a5c96.tar.gz monzero-core-8b0113592710116a95a2e5503ebb6055315a5c96.tar.xz monzero-core-8b0113592710116a95a2e5503ebb6055315a5c96.zip | |
Merge pull request #9438
322953e62 assign default port for http and https clients (woodser)
Diffstat (limited to 'contrib')
| -rw-r--r-- | contrib/epee/src/abstract_http_client.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/contrib/epee/src/abstract_http_client.cpp b/contrib/epee/src/abstract_http_client.cpp index 3ae09c90e..03f73cbbc 100644 --- a/contrib/epee/src/abstract_http_client.cpp +++ b/contrib/epee/src/abstract_http_client.cpp @@ -135,6 +135,13 @@ namespace http http::url_content parsed{}; const bool r = parse_url(address, parsed); CHECK_AND_ASSERT_MES(r, false, "failed to parse url: " << address); + if (parsed.port == 0) + { + if (parsed.schema == "http") + parsed.port = 80; + else if (parsed.schema == "https") + parsed.port = 443; + } set_server(std::move(parsed.host), std::to_string(parsed.port), std::move(user), std::move(ssl_options)); return true; } |
