Skip to content

HTTP/2 upload too large request does not immediately end #15316

Description

@jkamp-aws

I did this

Create a request where the server is going to reply HTTP/2 413. Using curl cli to make the request:

curl --http2 -X POST -d @./too-large-request -s -i $URL

I expected the following

curl to end quickly without an error code, but instead curl waits for the server as if it wants to upload the full data or another request. The server closes the connection (for me 5 minutes) and then curl ends with error 18.

< HTTP/2 413 
< date: Thu, 17 Oct 2024 07:19:20 GMT
< content-type: text/xml
< content-length: 635
< server: Server
* HTTP error before end of send, stop sending
* abort upload after having sent 212992 bytes
< 
* received GOAWAY, error=0, last_stream=1
* TLSv1.3 (IN), TLS alert, close notify (256):
* closing connection #0
curl: (18) Transferred a partial file

Same output but from curl 7.81.0 (reported 8.6.1 should have been good too)

< HTTP/2 413 
< date: Thu, 17 Oct 2024 08:12:15 GMT
< content-type: text/xml
< content-length: 635
< server: Server
* HTTP error before end of send, stop sending
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
< 
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* Connection #0 to host hostname left intact

curl/libcurl version

curl 8.10.1 (x86_64-pc-linux-gnu) libcurl/8.10.1 OpenSSL/3.0.2 zlib/1.2.11 zstd/1.4.8 libpsl/0.21.0 nghttp2/1.43.0 OpenLDAP/2.5.18
Release-Date: 2024-09-18
Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns ldap ldaps mqtt pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS HSTS HTTP2 HTTPS-proxy IPv6 Largefile libz NTLM PSL SSL threadsafe TLS-SRP UnixSockets zstd

operating system

Linux ip-192-168-10-106 6.8.0-1015-aws #16~22.04.1-Ubuntu SMP Mon Aug 19 19:38:17 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions