I did this
curl builded with schannel only ssl backend + http2
trying to post large content through http2
small.bin - 4bytes
large.bin - 550400bytes
curl.exe -v --http2 -X POST -F "image=@small.bin" "https://nghttp2.org/"
curl.exe -v --http2 -X POST -F "image=@large.bin" "https://nghttp2.org/"
small one produces sane answer
curl.exe -v --http2 -X POST -F "image=@small.bin" "https://nghttp2.org/"
Note: Unnecessary use of -X or --request, POST is already inferred.
* Trying 139.162.123.134:443...
* Connected to nghttp2.org (139.162.123.134) port 443 (#0)
* schannel: ALPN, offering h2
* schannel: ALPN, offering http/1.1
* schannel: ALPN, server accepted to use h2
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x23ac4a9e4a0)
> POST / HTTP/2
> Host: nghttp2.org
> user-agent: curl/7.69.1
> accept: */*
> content-length: 206
> content-type: multipart/form-data; boundary=------------------------c829f3918ae6100f
>
* Connection state changed (MAX_CONCURRENT_STREAMS == 100)!
* We are completely uploaded and fine
< HTTP/2 405
< date: Thu, 02 Apr 2020 22:39:05 GMT
< allow: GET, HEAD
< content-type: text/plain; charset=utf-8
< content-length: 18
< x-backend-header-rtt: 0.029245
< strict-transport-security: max-age=31536000
< server: nghttpx
< via: 2 nghttpx
< alt-svc: h3-23=":4433"; ma=3600
< x-frame-options: SAMEORIGIN
< x-xss-protection: 1; mode=block
< x-content-type-options: nosniff
<
method not allowed* Connection #0 to host nghttp2.org left intact
large one unable to complete request
Note: Unnecessary use of -X or --request, POST is already inferred.
* Trying 139.162.123.134:443...
* Connected to nghttp2.org (139.162.123.134) port 443 (#0)
* schannel: ALPN, offering h2
* schannel: ALPN, offering http/1.1
* schannel: ALPN, server accepted to use h2
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x2075f3f0990)
> POST / HTTP/2
> Host: nghttp2.org
> user-agent: curl/7.69.1
> accept: */*
> content-length: 550602
> content-type: multipart/form-data; boundary=------------------------e1d99eb1ee8c07ba
>
* Connection state changed (MAX_CONCURRENT_STREAMS == 100)!
* schannel: timed out sending data (bytes sent: 0)
* Failed sending HTTP2 data
* schannel: timed out sending data (bytes sent: 0)
* Failed sending HTTP2 data
* Connection #0 to host nghttp2.org left intact
curl: (55) schannel: timed out sending data (bytes sent: 0)
if i try curl compiled with openssl backend then large.bin produces right output
Note: Unnecessary use of -X or --request, POST is already inferred.
* Trying 139.162.123.134:443...
* Connected to nghttp2.org (139.162.123.134) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: D:\curl-ca-bundle.crt
CApath: none
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN, server accepted to use h2
* Server certificate:
* subject: CN=nghttp2.org
* start date: Mar 20 00:00:08 2020 GMT
* expire date: Jun 18 00:00:08 2020 GMT
* subjectAltName: host "nghttp2.org" matched cert's "nghttp2.org"
* issuer: C=US; O=Let's Encrypt; CN=Let's Encrypt Authority X3
* SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x1d63091aae0)
> POST / HTTP/2
> Host: nghttp2.org
> user-agent: curl/7.69.1
> accept: */*
> content-length: 550602
> content-type: multipart/form-data; boundary=------------------------6b0b455e2a843eb9
>
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* old SSL session ID is stale, removing
* Connection state changed (MAX_CONCURRENT_STREAMS == 100)!
* We are completely uploaded and fine
< HTTP/2 405
< date: Thu, 02 Apr 2020 22:44:19 GMT
< allow: GET, HEAD
< content-type: text/plain; charset=utf-8
< content-length: 18
< x-backend-header-rtt: 2.198317
< strict-transport-security: max-age=31536000
< server: nghttpx
< via: 2 nghttpx
< alt-svc: h3-23=":4433"; ma=3600
< x-frame-options: SAMEORIGIN
< x-xss-protection: 1; mode=block
< x-content-type-options: nosniff
<
method not allowed* Connection #0 to host nghttp2.org left intact
405 and nghttp2.org was taken as most simple example. Case can also be reproduced by unabling to POST valid large form through http2.
curl/libcurl version
curl 7.69.1 (x86_64-pc-win32) libcurl/7.69.1 Schannel zlib/1.2.8 libssh2/1.9.0 nghttp2/1.40.0
Release-Date: 2020-03-11
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: AsynchDNS HTTP2 Kerberos Largefile NTLM SPNEGO SSL SSPI UnixSockets libz
operating system
Windows 10
I did this
curl builded with schannel only ssl backend + http2
trying to post large content through http2
small.bin - 4bytes
large.bin - 550400bytes
curl.exe -v --http2 -X POST -F "image=@small.bin" "https://nghttp2.org/"
curl.exe -v --http2 -X POST -F "image=@large.bin" "https://nghttp2.org/"
small one produces sane answer
large one unable to complete request
if i try curl compiled with openssl backend then large.bin produces right output
405 and nghttp2.org was taken as most simple example. Case can also be reproduced by unabling to POST valid large form through http2.
curl/libcurl version
curl 7.69.1 (x86_64-pc-win32) libcurl/7.69.1 Schannel zlib/1.2.8 libssh2/1.9.0 nghttp2/1.40.0
Release-Date: 2020-03-11
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: AsynchDNS HTTP2 Kerberos Largefile NTLM SPNEGO SSL SSPI UnixSockets libz
operating system
Windows 10