← Commit list

f86897d831

Stefan Eissing
Stefan Eissing
2026-09-08
SUCCESS Duration: 426s

Subject

http2: changes in error handling

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+3 -3
@@ -496,7 +496,7 @@ static CURLcode h2_process_pending_input(struct Curl_cfilter *cf,
rv = nghttp2_session_mem_recv(ctx->h2, (const uint8_t *)buf, blen);
if(!curlx_sztouz(rv, &nread)) {
failf(data, "nghttp2 recv error %zd: %s", rv, nghttp2_strerror((int)rv));
- return CURLE_HTTP2;
+ return CURLE_RECV_ERROR;
}
Curl_bufq_skip(&ctx->inbufq, nread);
if(Curl_bufq_is_empty(&ctx->inbufq)) {
@@ -1253,10 +1253,10 @@ static int cf_h2_on_invalid_frame_recv(nghttp2_session *session,
stream->error = ngerr;
stream->closed = TRUE;
stream->reset = TRUE;
- return 0; /* keep the connection alive */
}
}
- return NGHTTP2_ERR_CALLBACK_FAILURE;
+ /* Return no error, nghttp2 will RST/GOAWAY by itself when needed */
+ return 0;
}
static int on_data_chunk_recv(nghttp2_session *session, uint8_t flags,
tests/http/test_01_basic.py+1 -1
@@ -213,7 +213,7 @@ class TestBasic:
f'/curltest/tweak?x-hd={256 * 1024}'
r = curl.http_get(url=url, alpn_proto=proto, extra_args=[])
if proto == 'h2':
- r.check_exit_code(16) # CURLE_HTTP2
+ r.check_exit_code(56) # CURLE_RECV_ERROR
else:
r.check_exit_code(0) # 1.1 can do