]> git.ipfire.org Git - thirdparty/curl.git/commit
http2: enhance error messages on Curl_dyn* upon receiving headers
authorPeng-Yu Chen <pengyu@libstarrify.so>
Sun, 2 Mar 2025 17:15:21 +0000 (17:15 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 3 Mar 2025 09:30:54 +0000 (10:30 +0100)
commitf61b218e7de1c0a5278bee544977189aa66d8f38
tree9fb62f50f5419cc57fa9c501f0c976870fefbcfb
parent0d3b5937b38817b6fbd2d60cc178c1df4bd59d0d
http2: enhance error messages on Curl_dyn* upon receiving headers

This is a partial fix of #16535. The error message format is borrowed
from the existing code[1].

Sample message before:
    curl: (56) process_pending_input: nghttp2_session_mem_recv() returned -902:The user callback function failed

Sample message after:
    curl: (56) Error receiving HTTP2 header: 100(A value or data field grew larger than allowed)

[1]: https://github.com/curl/curl/blob/df672695e5992ad9b99819e9950de682e243cb48/lib/http2.c#L1999-L2000

Closes #16536
lib/http2.c