]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
h3/nghttp3: return NGHTTP3_ERR_CALLBACK_FAILURE from recv_header
authorJoshua Rogers <MegaManSec@users.noreply.github.com>
Tue, 7 Oct 2025 05:59:09 +0000 (13:59 +0800)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 7 Oct 2025 21:59:00 +0000 (23:59 +0200)
Closes #18904

lib/vquic/curl_ngtcp2.c

index b48d1af555ac6d848027d1ee4c7c0b8c56e9ae73..0254f594efcf431f63f97e3f35872316b496f690 100644 (file)
@@ -1142,7 +1142,7 @@ static int cb_h3_recv_header(nghttp3_conn *conn, int64_t sid,
     result = Curl_http_decode_status(&stream->status_code,
                                      (const char *)h3val.base, h3val.len);
     if(result)
-      return -1;
+      return NGHTTP3_ERR_CALLBACK_FAILURE;
     curlx_dyn_reset(&ctx->scratch);
     result = curlx_dyn_addn(&ctx->scratch, STRCONST("HTTP/3 "));
     if(!result)
@@ -1156,7 +1156,7 @@ static int cb_h3_recv_header(nghttp3_conn *conn, int64_t sid,
     CURL_TRC_CF(data, cf, "[%" FMT_PRId64 "] status: %s",
                 stream_id, curlx_dyn_ptr(&ctx->scratch));
     if(result) {
-      return -1;
+      return NGHTTP3_ERR_CALLBACK_FAILURE;
     }
   }
   else {