You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
curl uses http/1.1 alpn code when told to use http/1.0 #20487
This doesn't cause much of an issue, but i feel it's incorrect to exclusively offer HTTP/1.1 for a HTTP/1.0 connection.
I feel like curl should at least offer HTTP/1.0 as the preferred protocol when --http1.0 is used.
This doesn't cause much of an issue, but i feel it's incorrect to exclusively offer HTTP/1.1 for a HTTP/1.0 connection. I feel like curl should at least offer HTTP/1.0 as the preferred protocol when --http1.0 is used.
Do you know of a server that implements this ALPN (apart from the fact that ALPN http/1.0 is not a registered identifier)? Apache does not. And what should a server do then? Reject an incoming HTTP/1.1 request on such a connection? I do not see anyone implementing this.
I think for HTTP/1.0 requests we should keep sending ALPN http/1.1 for compatibility reasons, however we could also send ALPN http/1.0 for servers that accept only that. In other words send both, see #20533.
Activity
jay commentedon Jan 31, 2026
Ref: #12259
Ref: https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids
curl uses ALPN
http/1.1for HTTP/1.0 requests for compatibility reasons.curl/lib/vtls/vtls.c
Lines 150 to 170 in 2eebc58
bagder commentedon Feb 3, 2026
@programmerlexi is this actually causing a problem for you?
programmerlexi commentedon Feb 4, 2026
This doesn't cause much of an issue, but i feel it's incorrect to exclusively offer HTTP/1.1 for a HTTP/1.0 connection.
I feel like curl should at least offer HTTP/1.0 as the preferred protocol when
--http1.0is used.icing commentedon Feb 5, 2026
Do you know of a server that implements this ALPN (apart from the fact that ALPN
http/1.0is not a registered identifier)? Apache does not. And what should a server do then? Reject an incoming HTTP/1.1 request on such a connection? I do not see anyone implementing this.programmerlexi commentedon Feb 5, 2026
I am currently implementing a server that does.
http/1.0it is a registered identifier in the registry.Yes.
icing commentedon Feb 5, 2026
Ah, ok. They added it since the last time I looked. Hmm...not sure I see the benefit of such...but you are of course free to implement such a server.
vtls: use ALPN http/1.1 & http/1.0 for HTTP/1.0 requests
jay commentedon Feb 5, 2026
I think for HTTP/1.0 requests we should keep sending ALPN http/1.1 for compatibility reasons, however we could also send ALPN http/1.0 for servers that accept only that. In other words send both, see #20533.
vtls: use ALPN http/1.0 & http/1.1 for HTTP/1.0 requests
jay commentedon Feb 9, 2026
Thanks. For HTTP/1.0 requests curl will now send ALPNs http/1.0 and http/1.1 and the server can pick which one it recognizes.