You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ic...@apache.org on 2025/03/10 10:09:43 UTC
svn commit: r1924267 - in /httpd/httpd/trunk: changes-entries/pr69580.txt modules/http2/h2_stream.c
Author: icing
Date: Mon Mar 10 10:09:43 2025
New Revision: 1924267
URL: http://svn.apache.org/viewvc?rev=1924267&view=rev
Log:
*) mod_http2: Fix handling of 304 responses from mod_cache. PR 69580.
Added:
httpd/httpd/trunk/changes-entries/pr69580.txt
Modified:
httpd/httpd/trunk/modules/http2/h2_stream.c
Added: httpd/httpd/trunk/changes-entries/pr69580.txt
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/changes-entries/pr69580.txt?rev=1924267&view=auto
==============================================================================
--- httpd/httpd/trunk/changes-entries/pr69580.txt (added)
+++ httpd/httpd/trunk/changes-entries/pr69580.txt Mon Mar 10 10:09:43 2025
@@ -0,0 +1,2 @@
+ *) mod_http2: Fix handling of 304 responses from mod_cache. PR 69580.
+ [Stefan Eissing]
Modified: httpd/httpd/trunk/modules/http2/h2_stream.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http2/h2_stream.c?rev=1924267&r1=1924266&r2=1924267&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http2/h2_stream.c (original)
+++ httpd/httpd/trunk/modules/http2/h2_stream.c Mon Mar 10 10:09:43 2025
@@ -1493,7 +1493,8 @@ static ssize_t stream_data_cb(nghttp2_se
buf_len = output_data_buffered(stream, &eos, &header_blocked);
}
else if (APR_EOF == rv) {
- if (!stream->output_eos) {
+ if (!stream->output_eos &&
+ !AP_STATUS_IS_HEADER_ONLY(stream->response->status)) {
/* Seeing APR_EOF without an EOS bucket received before indicates
* that stream output is incomplete. Commonly, we expect to see
* an ERROR bucket to have been generated. But faulty handlers
@@ -1601,8 +1602,9 @@ static apr_status_t stream_do_response(h
ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, c1,
H2_STRM_MSG(stream, "process response %d"),
resp->status);
- is_empty = (e != APR_BRIGADE_SENTINEL(stream->out_buffer)
- && APR_BUCKET_IS_EOS(e));
+ is_empty = AP_STATUS_IS_HEADER_ONLY(resp->status) ||
+ ((e != APR_BRIGADE_SENTINEL(stream->out_buffer) &&
+ APR_BUCKET_IS_EOS(e)));
break;
}
else if (APR_BUCKET_IS_EOS(b)) {