-
-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Description
I did this
Using libcurl in Ladybird, I set CURLOPT_ALTSVC to a filepath. I then connected to https://developer.mozilla.org/en-US/ which responds with the following alt-svc headers in this order:
alt-svc: h3=":443"; ma=2592000
alt-svc: clear
See the libcurl usage here: https://github.com/LadybirdBrowser/ladybird/blob/941da11ece90b7edc5d7887dde01671bd9052bb0/Services/RequestServer/ConnectionFromClient.cpp#L494
I expected the following
I expected it to clear the HTTP/3 Alt-Svc entry, however it was kept. This caused subsequent connections to use HTTP/3, which the given server does not support at the time of writing.
Looking at the following unit test, it appears that if it ends with a semicolon, it functions correctly. However, there is not a test for if it does not end with a semicolon:
Lines 92 to 96 in 9bdd08b
| /* clear that one again and decrease the counter */ | |
| result = Curl_altsvc_parse(curl, asi, "clear;\r\n", | |
| ALPN_h1, "curl.se", 80); | |
| fail_if(result, "Curl_altsvc_parse(7) failed!"); | |
| fail_unless(Curl_llist_count(&asi->list) == 10, "wrong number of entries"); |
curl/libcurl version
libcurl/8.14.1-DEV OpenSSL/3.5.0 zlib/1.3.1 brotli/1.1.0 zstd/1.5.7 nghttp2/1.66.0 ngtcp2/1.13.0 nghttp3/1.10.1
operating system
Darwin Mac.lan 24.5.0 Darwin Kernel Version 24.5.0: Tue Apr 22 19:53:27 PDT 2025; root:xnu-11417.121.6~2/RELEASE_ARM64_T6041 arm64