Skip to content

curl with --http3 -I doesn't work properly ? #4358

@centminmod

Description

@centminmod

I built custom curl with quiche/boringssl support outlined at https://github.com/curl/curl/blob/master/docs/HTTP3.md in a Ubuntu 19.04 docker image on a CentOS 7 docker host server with one minor change to revert quiche library's recent commit 89d0317 which updated to H3-23 draft so I could test with H3-22 draft.

and setup curl-http3 alias command

alias curl-http3="/usr/local/src/curl/src/curl"
curl-http3 -V
curl 7.66.1-DEV (x86_64-pc-linux-gnu) libcurl/7.66.1-DEV BoringSSL zlib/1.2.11 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) nghttp2/1.36.0 quiche/0.1.0-alpha4
Release-Date: [unreleased]
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp 
Features: AsynchDNS HTTP2 HTTP3 HTTPS-proxy IDN IPv6 Largefile libz NTLM NTLM_WB PSL SSL UnixSockets
/usr/local/src/curl/src/curl -V 
curl 7.66.1-DEV (x86_64-pc-linux-gnu) libcurl/7.66.1-DEV BoringSSL zlib/1.2.11 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) nghttp2/1.40.0-DEV quiche/0.1.0-alpha4
Release-Date: [unreleased]
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp 
Features: AsynchDNS HTTP2 HTTP3 HTTPS-proxy IDN IPv6 Largefile libz NTLM NTLM_WB PSL SSL UnixSockets

and tested against https://geekflare.com with Cloudflare HTTP/3 enabled and trying to use -I flag for header check fails and returns to command line empty/blank for either of these 2 commands with quiche H3-22 draft

curl-http3 --http3 -I https://geekflare.com
curl-http3 -I --http3 https://geekflare.com

this works as follows though

curl-http3 --http3 -s -o /dev/null -v https://geekflare.com
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
*   Trying 2606:4700:20::6819:866b:443...
* Sent QUIC client Initial, ALPN: h3-22
* h3 [:method: GET]
* h3 [:path: /]
* h3 [:scheme: https]
* h3 [:authority: geekflare.com]
* h3 [User-Agent: curl/7.66.1-DEV]
* h3 [Accept: */*]
* Using HTTP/3 Stream ID: 0 (easy handle 0x55fa3a89ad80)
> GET / HTTP/3
> Host: geekflare.com
> User-Agent: curl/7.66.1-DEV
> Accept: */*
> 
< HTTP/3 200
< date: Sun, 15 Sep 2019 21:32:02 GMT
< content-type: text/html; charset=UTF-8
* Added cookie __cfduid="d71aa2e1cf2a7d4be8cc7edbce9fa34231568583122" for domain geekflare.com, path /, expire 1600119122
< set-cookie: __cfduid=d71aa2e1cf2a7d4be8cc7edbce9fa34231568583122; expires=Mon, 14-Sep-20 21:32:02 GMT; path=/; domain=.geekflare.com; HttpOnly; Secure
< vary: Accept-Encoding
< link: <https://geekflare.com/wp-json/>; rel="https://api.w.org/"
< link: <https://geekflare.com/>; rel=shortlink
< x-srcache-fetch-status: HIT
< x-srcache-store-status: BYPASS
< x-powered-by: EasyEngine v4.0.12
< via: 1.1 google
< strict-transport-security: max-age=15552000; preload
< x-content-type-options: nosniff
< alt-svc: h3-22=":443"; ma=86400
< expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
< server: cloudflare
< cf-ray: 516db603fb39cedc-IAD
< 
{ [16708 bytes data]
* Connection #0 to host geekflare.com left intact

I expected the following

I expected curl with -I flag to show header responses. It works for --http2 and --http1.1 just not for --http3 which returns blank

http1.1

curl-http3 --http1.1 -I https://geekflare.com
HTTP/1.1 200 OK
Date: Sun, 15 Sep 2019 21:54:02 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Set-Cookie: __cfduid=d52c28ed8d4aa096fdb0e077deea6561c1568584442; expires=Mon, 14-Sep-20 21:54:02 GMT; path=/; domain=.geekflare.com; HttpOnly; Secure
Vary: Accept-Encoding
Link: <https://geekflare.com/wp-json/>; rel="https://api.w.org/"
Link: <https://geekflare.com/>; rel=shortlink
X-SRCache-Fetch-Status: MISS
X-SRCache-Store-Status: BYPASS
X-Powered-By: EasyEngine v4.0.12
Via: 1.1 google
Strict-Transport-Security: max-age=15552000; preload
X-Content-Type-Options: nosniff
Alt-Svc: h3-22=":443"; ma=86400
Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Server: cloudflare
CF-RAY: 516dd63dea7cc5fc-EWR

http2

curl-http3 --http2 -I https://geekflare.com 
HTTP/2 200 
date: Sun, 15 Sep 2019 21:53:12 GMT
content-type: text/html; charset=UTF-8
set-cookie: __cfduid=d2a4f4b6cff1634590f1ce343f4f2a4ce1568584392; expires=Mon, 14-Sep-20 21:53:12 GMT; path=/; domain=.geekflare.com; HttpOnly; Secure
vary: Accept-Encoding
link: <https://geekflare.com/wp-json/>; rel="https://api.w.org/"
link: <https://geekflare.com/>; rel=shortlink
x-srcache-fetch-status: MISS
x-srcache-store-status: BYPASS
x-powered-by: EasyEngine v4.0.12
via: 1.1 google
strict-transport-security: max-age=15552000; preload
x-content-type-options: nosniff
alt-svc: h3-22=":443"; ma=86400
expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
server: cloudflare
cf-ray: 516dd5068ccbc1ed-IAD

operating system

Ubuntu 19.04 docker image on CentOS 7.6 64bit docker host

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 19.04
Release:        19.04
Codename:       disco

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions