Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uri: fix schema reporting #816

Merged
merged 1 commit into from
Oct 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/ocpp/common/websocket/websocket_uri.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,16 @@ Uri Uri::parse_and_validate(std::string uri, std::string chargepoint_id, int sec
case security::SecurityProfile::UNSECURED_TRANSPORT_WITH_BASIC_AUTHENTICATION:
if (uri_temp.get_secure()) {
throw std::invalid_argument(
"secure schema 'ws://' in URI does not fit with insecure security-profile = " +
std::to_string(security_profile));
"secure schema '" + uri_temp.get_scheme() +
"://' in URI does not fit with insecure security-profile = " + std::to_string(security_profile));
}
break;
case security::SecurityProfile::TLS_WITH_BASIC_AUTHENTICATION:
case security::SecurityProfile::TLS_WITH_CLIENT_SIDE_CERTIFICATES:
if (!uri_temp.get_secure()) {
throw std::invalid_argument(
"insecure schema 'ws://' in URI does not fit with secure security-profile = " +
std::to_string(security_profile));
"insecure schema '" + uri_temp.get_scheme() +
"://' in URI does not fit with secure security-profile = " + std::to_string(security_profile));
}
break;
default:
Expand Down
Loading