You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In response to that, Curl sent the HTTP2 connection preface without sending the data.
It doesn't fail every time; sometimes when the HTTP 101 header is late enough, curl manages to send the request body correctly.
I expected the following
I expected curl to send the request data before sending the HTTP2 preface
A client cannot begin using an upgraded protocol on the connection until it has completely sent the request message (i.e., the client can't change the protocol it is sending in the middle of a message). If a server receives both an Upgrade and an Expect header field with the "100-continue" expectation (Section 5.1.1 of [RFC7231]), the server MUST send a 100 (Continue) response before sending a 101 (Switching Protocols) response.
Ah, @djelinski thanks for the link. You learn something new every day. In Apache httpd, I never allow protocol switching on requests with a body. Which allows me to remain ignorant so far of these intricacies.
The easiest way to fix the curl handling of this would be, my guess, to never send Upgrade: together with an Expect:, I guess.