Skip to content

Commit

Permalink
use scheme-id instead of scheme string
Browse files Browse the repository at this point in the history
  • Loading branch information
cwaldren-ld committed Apr 5, 2024
1 parent 97461d1 commit 025ba4b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libs/server-sent-events/src/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -590,8 +590,8 @@ std::shared_ptr<Client> Builder::build() {
request.target(uri_components->encoded_target());

if (uri_components->has_scheme()) {
if (!(uri_components->scheme() == "http" ||
uri_components->scheme() == "https")) {
if (!(uri_components->scheme_id() == boost::urls::scheme::http ||
uri_components->scheme_id() == boost::urls::scheme::https)) {
return nullptr;
}
}
Expand All @@ -604,7 +604,7 @@ std::shared_ptr<Client> Builder::build() {
: uri_components->scheme();

std::optional<ssl::context> ssl;
if (uri_components->scheme() == "https") {
if (uri_components->scheme_id() == boost::urls::scheme::https) {
ssl = launchdarkly::foxy::make_ssl_ctx(ssl::context::tlsv12_client);
ssl->set_default_verify_paths();
}
Expand Down

0 comments on commit 025ba4b

Please sign in to comment.