← Commit list

3a397f7a05

Stefan Eissing
Stefan Eissing
2026-09-16
SUCCESS Duration: 388s

Subject

http2: update a refused stream's error after GOAWAY

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

lib/http2.c+9 -1
@@ -1335,8 +1335,16 @@ static int on_stream_close(nghttp2_session *session, int32_t stream_id,
stream->closed = TRUE;
stream->error = error_code;
- if(stream->error)
+ if(stream->error) {
stream->reset = TRUE;
+ if((stream->error == NGHTTP2_REFUSED_STREAM) &&
+ ctx->rcvd_goaway && ctx->goaway_error)
+ /* REFUSED_STREAM is used by nghttp2 on a GOAWAY from the
+ * server where it indicated it will no longer process this stream.
+ * If the GOAWAY carried an error code, take that as the error for
+ * the stream. */
+ stream->error = ctx->goaway_error;
+ }
if(stream->error)
CURL_TRC_CF(data_s, cf, "[%d] RESET: %s (err %u)",