From 025ba4b23ad0d088400101bdc99fb2d9c1ec0f71 Mon Sep 17 00:00:00 2001 From: Casey Waldren Date: Fri, 5 Apr 2024 10:14:37 -0700 Subject: [PATCH] use scheme-id instead of scheme string --- libs/server-sent-events/src/client.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/server-sent-events/src/client.cpp b/libs/server-sent-events/src/client.cpp index cb8d87b8d..c3c051365 100644 --- a/libs/server-sent-events/src/client.cpp +++ b/libs/server-sent-events/src/client.cpp @@ -590,8 +590,8 @@ std::shared_ptr 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; } } @@ -604,7 +604,7 @@ std::shared_ptr Builder::build() { : uri_components->scheme(); std::optional 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(); }