zwoop commented on code in PR #13447:
URL: https://github.com/apache/trafficserver/pull/13447#discussion_r4150891325
##########
src/proxy/http2/Http2Stream.cc:
##########
@@ -866,14 +866,25 @@ Http2Stream::update_write_request(bool call_update)
this->parsing_header_done = true;
Http2StreamDebug("update_write_request parsing done, read %d bytes",
bytes_used);
- // Schedule session shutdown if response header has "Connection: close"
- MIMEField *field =
this->_send_header.field_find(static_cast<std::string_view>(MIME_FIELD_CONNECTION));
- if (field) {
- auto value{field->value_get()};
- if (value == static_cast<std::string_view>(HTTP_VALUE_CLOSE)) {
- SCOPED_MUTEX_LOCK(lock, _proxy_ssn->mutex, this_ethread());
- if (connection_state.get_shutdown_state() == HTTP2_SHUTDOWN_NONE) {
- connection_state.set_shutdown_state(HTTP2_SHUTDOWN_NOT_INITIATED,
Http2ErrorCode::HTTP2_ERROR_NO_ERROR);
+ // Only honor `Connection: close` -> graceful-shutdown on the inbound
Review Comment:
This can clearly be reduced to a single line, if any. It's clear from the
code that we're doing this only if it's not an is_outbound_connection(). ...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]