]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
hyper: no h2c support
authorDaniel Stenberg <daniel@haxx.se>
Sat, 19 Mar 2022 22:12:03 +0000 (23:12 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 20 Mar 2022 15:45:08 +0000 (16:45 +0100)
Make tests require h2c feature present to run, and only set h2c if
nghttp2 is used in the build. Hyper does not support it.

Remove those tests from DISABLED

Fixes #8605
Closes #8613

docs/HYPER.md
tests/FILEFORMAT.md
tests/data/DISABLED
tests/data/test1700
tests/data/test1701
tests/data/test1702
tests/data/test1800
tests/data/test358
tests/data/test359
tests/runtests.pl

index a0f39696bdb6fd77f508078e11a53bc414669cd3..00c85d576a75701f1b2f2fa56fcc4ab00ab5668e 100644 (file)
@@ -56,8 +56,9 @@ The hyper backend does not support
 - `CURLOPT_IGNORE_CONTENT_LENGTH`
 - `--raw` and disabling `CURLOPT_HTTP_TRANSFER_DECODING`
 - RTSP
-- hyper is much stricter about what HTTP header contents it allow in requests
+- hyper is much stricter about what HTTP header contents it allows
 - HTTP/0.9
+- HTTP/2 upgrade using HTTP:// URLs. Aka 'h2c'
 
 ## Remaining issues
 
index 291c944c965ec8236ef8827d0501cbf6eb819732..003df8ea63d27db319ea0215d0da48305eb586fc 100644 (file)
@@ -384,6 +384,7 @@ Features testable here are:
 - `getrlimit`
 - `GnuTLS`
 - `GSS-API`
+- `h2c`
 - `HSTS`
 - `HTTP-auth`
 - `http/2`
index 7187ec371dfbb5a3249e48ec5e5d844bb6171113..466dc3208ee0170fb1a50f43bd99c835c505956e 100644 (file)
@@ -43,8 +43,6 @@
 265
 266
 357
-358
-359
 565
 579
 580
 1533
 1540
 1591
-1700
-1701
-1702
-1800
 %endif
 2043
 # Tests that are disabled here for rustls are SUPPOSED to work
index 9cf873928549e4f6f0510b483660ee8403a2f468..8b1ef4ae336c3862a1d2a146b6b1e0ae70bda8e8 100644 (file)
@@ -38,6 +38,9 @@ Content-Type: text/html
 #
 # Client-side
 <client>
+<features>
+h2c
+</features>
 <server>
 http
 http/2
index c4687d9117ec4b63f5354d92e3b2cfc977c14743..3c1a2bd0b82176593e4293e78fb90e1b05c59345 100644 (file)
@@ -29,6 +29,9 @@ Funny-head: yesyes
 #
 # Client-side
 <client>
+<features>
+h2c
+</features>
 <server>
 http
 http/2
index b679c7bca1d23d9c7fc94cb9f6dcece9841e60ff..1da9bc6b585771b58608b3f9b4d744ec375c6248 100644 (file)
@@ -28,6 +28,9 @@ Funny-head: yesyes
 #
 # Client-side
 <client>
+<features>
+h2c
+</features>
 <server>
 http
 http/2
index 85e247c3cb9b4141e2f0578ad3fec53afc56d404..d7cc73af4181914a4c41926c95c5d419ab225d5d 100644 (file)
@@ -23,6 +23,9 @@ Content-Type: text/html
 
 # Client-side
 <client>
+<features>
+h2c
+</features>
 <server>
 http
 </server>
index d1ddc1b9e7e81b7dc7276eb6523eb8d6b640eaf9..8b4f6606247a0b76ff2410bfc063cf2eb48ef3bc 100644 (file)
@@ -30,6 +30,7 @@ Alt-Svc: h2=":%HTTP2PORT", ma=315360000; persist=0
 <features>
 alt-svc
 debug
+h2c
 </features>
 <server>
 http
index c1b1cb86c5b0727964ca12b4bdaabb7be20c6c5e..a5ba4e3ae0971c829f6cf778b124946e35cc4710 100644 (file)
@@ -30,6 +30,7 @@ Alt-Svc: h2=":%HTTP2PORT", ma=315360000; persist=0
 <features>
 alt-svc
 debug
+h2c
 </features>
 <server>
 https
index 8b8d6d80b3a6bd8e4cb81300cc63fcb4c139e8c6..21fcf66752042adf354d9fa12e574417102d68fe 100755 (executable)
@@ -256,6 +256,7 @@ my $has_spnego;     # set if libcurl is built with SPNEGO support
 my $has_charconv;   # set if libcurl is built with CharConv support
 my $has_tls_srp;    # set if libcurl is built with TLS-SRP support
 my $has_http2;      # set if libcurl is built with HTTP2 support
+my $has_h2c;        # set if libcurl is built with h2c support
 my $has_httpsproxy; # set if libcurl is built with HTTPS-proxy support
 my $has_crypto;     # set if libcurl is built with cryptographic support
 my $has_cares;      # set if built with c-ares
@@ -2864,38 +2865,37 @@ sub compare {
 }
 
 sub setupfeatures {
-    $feature{"hyper"} = $has_hyper;
-    $feature{"c-ares"} = $has_cares;
     $feature{"alt-svc"} = $has_altsvc;
-    $feature{"HSTS"} = $has_hsts;
     $feature{"brotli"} = $has_brotli;
+    $feature{"c-ares"} = $has_cares;
     $feature{"crypto"} = $has_crypto;
     $feature{"debug"} = $debug_build;
     $feature{"getrlimit"} = $has_getrlimit;
     $feature{"GnuTLS"} = $has_gnutls;
     $feature{"GSS-API"} = $has_gssapi;
+    $feature{"h2c"} = $has_h2c;
+    $feature{"HSTS"} = $has_hsts;
     $feature{"http/2"} = $has_http2;
     $feature{"https-proxy"} = $has_httpsproxy;
+    $feature{"hyper"} = $has_hyper;
     $feature{"idn"} = $has_idn;
     $feature{"ipv6"} = $has_ipv6;
     $feature{"Kerberos"} = $has_kerberos;
     $feature{"large_file"} = $has_largefile;
     $feature{"ld_preload"} = ($has_ldpreload && !$debug_build);
-    $feature{"libz"} = $has_libz;
-    $feature{"libssh2"} = $has_libssh2;
     $feature{"libssh"} = $has_libssh;
-    $feature{"oldlibssh"} = $has_oldlibssh;
-    $feature{"rustls"} = $has_rustls;
-    $feature{"wolfssh"} = $has_wolfssh;
-    $feature{"wolfssl"} = $has_wolfssl;
+    $feature{"libssh2"} = $has_libssh2;
+    $feature{"libz"} = $has_libz;
     $feature{"manual"} = $has_manual;
     $feature{"MinGW"} = $has_mingw;
     $feature{"MultiSSL"} = $has_multissl;
     $feature{"NSS"} = $has_nss;
     $feature{"NTLM"} = $has_ntlm;
     $feature{"NTLM_WB"} = $has_ntlm_wb;
+    $feature{"oldlibssh"} = $has_oldlibssh;
     $feature{"OpenSSL"} = $has_openssl || $has_libressl || $has_boringssl;
     $feature{"PSL"} = $has_psl;
+    $feature{"rustls"} = $has_rustls;
     $feature{"Schannel"} = $has_schannel;
     $feature{"sectransp"} = $has_sectransp;
     $feature{"SPNEGO"} = $has_spnego;
@@ -2909,6 +2909,8 @@ sub setupfeatures {
     $feature{"unittest"} = $debug_build;
     $feature{"unix-sockets"} = $has_unix;
     $feature{"win32"} = $has_win32;
+    $feature{"wolfssh"} = $has_wolfssh;
+    $feature{"wolfssl"} = $has_wolfssl;
     $feature{"zstd"} = $has_zstd;
 
     # make each protocol an enabled "feature"
@@ -3040,6 +3042,10 @@ sub checksystem {
            if ($libcurl =~ /Hyper/i) {
                $has_hyper=1;
            }
+            if ($libcurl =~ /nghttp2/i) {
+                # nghttp2 supports h2c, hyper does not
+                $has_h2c=1;
+            }
             if ($libcurl =~ /libssh2/i) {
                 $has_libssh2=1;
             }