return std::from_chars(string_value.data(), string_value.data() + string_value.size(), value);
// letters as equivalent to lowercase in scheme names (e.g., allow "HTTP" as well as "http") for
// what content is enclosed (if any). All valid status codes are within the range of 100 to 599,
if (status_value < kMinimumResponseStatusCode || status_value > kMaximumResponseStatusCode) {
for (auto iter = value_string_view.begin(); iter != value_string_view.end() && is_valid; ++iter) {
return {HeaderValueValidationResult::Action::Reject, UhvResponseCodeDetail::get().InvalidHost};
// Check if the host/:authority contains the deprecated userinfo component. This is based on RFC
auto result = host.at(0) == '[' ? validateHostHeaderIPv6(host) : validateHostHeaderRegName(host);
// https://www.rfc-editor.org/rfc/rfc3986.html#section-3.2.2, that only validates the characters,
// https://www.rfc-editor.org/rfc/rfc3986.html#section-3.2.2, that only validates the characters,
port_delimiter != absl::string_view::npos ? host.substr(port_delimiter) : absl::string_view();
for (; char_to_encode != path.end() && !testCharInTable(kCharactersToEncode, *char_to_encode);
HeaderValidator::HeaderEntryValidationResult HeaderValidator::validateGenericRequestHeaderEntry(
// This map also contains validation methods for headers that have additional restrictions other
// For all (H/1, H/2 and H/3) protocols, trailers should only contain generic headers. As such a
void HeaderValidator::sanitizePathWithFragment(::Envoy::Http::RequestHeaderMap& header_map) {
return {PathNormalizer::PathNormalizationResult::Action::Reject, percent_00_result.details()};
HeaderValidator::checkForPercent00InUrlPath(const ::Envoy::Http::RequestHeaderMap& header_map) {