curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: ALPN - HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR

From: Robert Wolf via curl-users <curl-users_at_lists.haxx.se>
Date: Wed, 6 Jul 2022 13:25:34 +0200

Dear Daniel,

thank you for your answer.

On Tue, 5 Jul 2022, Daniel Stenberg wrote:

> Which curl version, using which nghttp2 version on what platform?

I have used the curl 7.83.1 nghttp2/1.45.1.

I am on Gentoo, I have now updated curl to

curl 7.84.0 (x86_64-pc-linux-gnu) libcurl/7.84.0 (GnuTLS/3.7.3) OpenSSL/1.1.1o zlib/1.2.12 libidn2/2.3.2 nghttp2/1.45.1
Release-Date: 2022-06-27
Protocols: dict file ftp ftps http https imap imaps mqtt pop3 pop3s rtsp smb smbs smtp smtps tftp
Features: AsynchDNS GSS-API HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz MultiSSL NTLM SPNEGO SSL threadsafe TLS-SRP UnixSockets

The issue still happens.

> And it would also help if you could record a failing HTTP/2 TCP stream with
> wireshark.

Where can I save or how can I send you the tcpdumps? May I send them to your
private address? I have made one with alpn and one without.

> I actually think that's rather a red herring/coincidence. ALPN is just a way
> to select h2, once h2 has been selected and is being transfered, there's
> nothing left from the alpn selection.

Maybe it's only coincidence. But there is difference in the size of received
data with and without ALPN. So maybe something sends or requests more data
over TLS with ALPN:

<= Recv data, 16375 bytes (0x3ff7) --- with ALPN
<= Recv data, 8192 bytes (0x2000) --- without ALPN

> I think you see a problem with the h2 implementation in the curl version you
> use. The browsers have different h2 implementations and don't suffer from
> this.

I don't know, where is the problem. Firefox and other browsers work. Curl and
Cloudflare do not work. Maybe curl and CF use the same h2 implementation.
But the problem can be on the apache server and only with curl/CF h2 implementation
the issue can be seen.

> I also suspect that a more modern version of curl doesn't support of this
> problem, but that's so far just a wild guess on my behalf.

OK, this is probably not the reason.


Thank you very much for your help.

Regards,

Robert Wolf.
-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-users
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2022-07-06