Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
http2: Fix missing nghttp2_session_send call in Curl_http2_switched
Previously in Curl_http2_switched, we called nghttp2_session_mem_recv to parse incoming data which were already received while curl was handling upgrade. But we didn't call nghttp2_session_send, and it led to make curl not send any response to the received frames. Most likely, we received SETTINGS from server at this point, so we missed opportunity to send SETTINGS + ACK. This commit adds missing nghttp2_session_send call in Curl_http2_switched to fix this issue. Bug: #192 Reported-by: Stefan Eissing
- Loading branch information
21e82bd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the expected error code in test1801 guaranteed to always be the same?
I get
CURLE_RECV_ERROR
(Recv failure: Connection reset by peer) on Fedora ARM builders whereasCURLE_HTTP2
(Send failure: Broken pipe) everywhere else. Tested withcurl-7.43.0
(which includes this fix) andnghttp2-1.1.1
.I came to conclusion that curl works as expected but the test is based on an assumption that is not guaranteed to hold in general. Is my conclusion correct?