All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yoann Congal" <yoann.congal@smile.fr>
To: <UpStream_IP-JJ@bmwtechworks.in>,
	<openembedded-core@lists.openembedded.org>
Cc: "Jackson James" <Jackson.James@bmwtechworks.in>
Subject: Re: [OE-core] [scarthgap][PATCH v2] curl: backport HTTP/2 and HTTP/3 error propagation fixes
Date: Mon, 23 Nov 2026 09:12:24 +0100	[thread overview]
Message-ID: <DN2FTIX5C6YZ.1S2ABPBCQPBGV@smile.fr> (raw)
In-Reply-To: <20261118115531.17374-1-UpStream_IP-JJ@bmwtechworks.in>

On Wed Nov 18, 2026 at 12:55 PM CET, Jackson James via openembedded-core wrote:
> From: Jackson James <Jackson.James@bmwtechworks.in>
>
> Backport upstream commits:
> https://github.com/curl/curl/commit/8dd81bd5db6d087c1d0f1b0332a5e8d0ad50d634
> https://github.com/curl/curl/commit/5c59f91427c6e14036070d4e1426360393458b25
>
> These fixes correct handling of transfer write errors in HTTP/2 and HTTP/3 (ngtcp2)
> during parallel transfers. In curl 8.7.1, write callback errors were not properly
> propagated, leading to incorrect exit codes and improper stream cancellation.
>
> Tests:
> - curl ptest in qemux86-64: passed
> - curl HTTP pytest (tests/http) in qemux86-64, with curl built with
>   HTTP/2 (nghttp2) and HTTP/3 (ngtcp2 + nghttp3): test_02_14_not_found
>   and test_02_15_fail_not_found passed for both h2 and h3 (4 passed)
>
> Signed-off-by: Jackson James <Jackson.James@bmwtechworks.in>
> ---
>  ...-pass-CURLcode-errors-from-callbacks.patch |  332 ++++
>  .../lib-add-Curl_xfer_write_resp_hd.patch     | 1746 +++++++++++++++++
>  meta/recipes-support/curl/curl_8.7.1.bb       |    2 +
>  3 files changed, 2080 insertions(+)
>  create mode 100644 meta/recipes-support/curl/curl/http2-ngtcp2-pass-CURLcode-errors-from-callbacks.patch
>  create mode 100644 meta/recipes-support/curl/curl/lib-add-Curl_xfer_write_resp_hd.patch

Hello,

This is a big refactor: 1700+ line patch. But the bug it is trying to fix
is unclear to me. As of now, it does not seem critical enough to me to justify
merging this and take the risks of regression and highten maintenance
work.

Can you explain a bit more:
* What this is fixing?
* Why is this the best way to fix this?

> diff --git a/meta/recipes-support/curl/curl/http2-ngtcp2-pass-CURLcode-errors-from-callbacks.patch b/meta/recipes-support/curl/curl/http2-ngtcp2-pass-CURLcode-errors-from-callbacks.patch
> new file mode 100644
> index 0000000000..c44322fb63
> --- /dev/null
> +++ b/meta/recipes-support/curl/curl/http2-ngtcp2-pass-CURLcode-errors-from-callbacks.patch
> @@ -0,0 +1,332 @@
> +From 5c59f91427c6e14036070d4e1426360393458b25 Mon Sep 17 00:00:00 2001
> +From: Stefan Eissing <stefan@eissing.org>
> +Date: Thu, 18 Apr 2024 23:24:34 +0200
> +Subject: [PATCH] http2 + ngtcp2: pass CURLcode errors from callbacks
> +
> +- errors returned by Curl_xfer_write_resp() and the header variant are
> +  not errors in the protocol. The result needs to be returned on the
> +  next recv() from the protocol filter.
> +
> +- make xfer write errors for response data cause the stream to be
> +  cancelled
> +
> +- added pytest test_02_14 and test_02_15 to verify that also for
> +  parallel processing
> +
> +Reported-by: Laramie Leavitt
> +Fixes #13411
> +Closes #13424
> +
> +Upstream-Status: Backport [https://github.com/curl/curl/commit/5c59f91427c6e14036070d4e1426360393458b25]
> +Comment: Hunks are refreshed; CURL_PRId64 replaced with PRId64 (not defined in 8.7.1)
> +
> +Signed-off-by: Jackson James <Jackson.James@bmwtechworks.in>
> +--- 
> + lib/http2.c                    | 64 +++++++++++++++++++++--------
> + lib/vquic/curl_ngtcp2.c        | 73 +++++++++++++++++++++++-----------
> + tests/http/test_02_download.py | 28 +++++++++++++
> + 3 files changed, 125 insertions(+), 40 deletions(-)
> +
> +diff --git a/lib/http2.c b/lib/http2.c
> +index 1ee57a4320ac..50dd878bb02e 100644
> +--- a/lib/http2.c
> ++++ b/lib/http2.c
> +@@ -955,7 +955,6 @@ static CURLcode on_stream_frame(struct C
> +   struct cf_h2_ctx *ctx = cf->ctx;
> +   struct h2_stream_ctx *stream = H2_STREAM_CTX(data);
> +   int32_t stream_id = frame->hd.stream_id;
> +-  CURLcode result;
> +   int rv;
> +
   ^ Also, this patch is not properly formatted, e.g. it lacks a space
   here indicating a context line. (There are other lines like this).
   To help you clean this, here is the script I use to check patch
   format: https://gist.github.com/ycongal-smile/3692790a48269e59d602e5be1d667982

Finally, this patch conflicts with another patch from the review series.
You will have to rebase once the next series merges.

Thanks!
-- 
Yoann Congal
Smile ECS


      reply	other threads:[~2026-11-23  8:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-18 11:55 [scarthgap][PATCH v2] curl: backport HTTP/2 and HTTP/3 error propagation fixes Jackson James
2026-11-23  8:12 ` Yoann Congal [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DN2FTIX5C6YZ.1S2ABPBCQPBGV@smile.fr \
    --to=yoann.congal@smile.fr \
    --cc=Jackson.James@bmwtechworks.in \
    --cc=UpStream_IP-JJ@bmwtechworks.in \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.