Update On Wed Nov 6 19:36:39 CET 2024

This commit is contained in:
github-action[bot]
2024-11-06 19:36:40 +01:00
parent 1db417eac9
commit b0af3ca28c
352 changed files with 8514 additions and 5573 deletions

View File

@@ -246,6 +246,27 @@ bool CliConnection::OnEndHeadersForStream(http2::adapter::Http2StreamId stream_i
if (it != request_map_.end()) {
server_field = it->second;
}
it = request_map_.find(":status"s);
if (it != request_map_.end()) {
std::string_view status_code_field = it->second;
int status_code;
// https://httpwg.org/specs/rfc9110.html#overview.of.status.codes
if (!StringToInt(status_code_field, &status_code) || status_code < 100 || status_code >= 600) {
LOG(INFO) << "Connection (client) " << connection_id() << " for " << remote_domain()
<< " got response with invalid status code: " << status_code_field;
return false;
}
if (status_code != 200) {
LOG(INFO) << "Connection (client) " << connection_id() << " for " << remote_domain()
<< " got response with unexpected status code: " << status_code << " expected: 200";
return false;
}
} else {
LOG(WARNING) << "Connection (client) " << connection_id() << " for " << remote_domain()
<< " got response with empty status code";
return false;
}
LOG(INFO) << "Connection (client) " << connection_id() << " for " << remote_domain() << " Padding support "
<< (padding_support_ ? "enabled" : "disabled") << " Backed by " << server_field << ".";