Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Error in the HTTP2 framing layer' after goaway #4267

TvdW opened this issue Aug 26, 2019 · 3 comments

'Error in the HTTP2 framing layer' after goaway #4267

TvdW opened this issue Aug 26, 2019 · 3 comments


Copy link

@TvdW TvdW commented Aug 26, 2019

I did this

A request to a HTTP/2 server that was restarting resulted in a "Error in the HTTP2 framing layer" message despite the server behaving correctly. Further investigation shows that in the case of a GOAWAY frame with a fully processed 204 "No content" response the GOAWAY wins and an error is returned.

I expected the following

Since the response was received in its entirety, there should be no error. The connection should then be closed (since there was a GOAWAY frame).

curl/libcurl version

$ ./bin/curl -V
curl 7.66.0-DEV (x86_64-unknown-linux-gnu) libcurl/7.66.0-DEV OpenSSL/1.0.2k-fips zlib/1.2.7 brotli/1.0.1 c-ares/1.15.0 nghttp2/1.39.1
Release-Date: [unreleased]
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp 
Features: AsynchDNS brotli Debug HTTP2 HTTPS-proxy IPv6 Largefile libz NTLM NTLM_WB SSL TrackMemory UnixSockets

steps to reproduce

I have this little Go program that runs a webserver to return a 204 while also sending a goaway frame: (running as while ./test; do true; done)

For simplicity, I also have it running at

$ ./bin/curl
curl: (16) Error in the HTTP2 framing layer
Copy link

@TvdW TvdW commented Aug 26, 2019

Just to be sure:

  • This happens with a different non-Go webserver as well (the nghttp2-based Envoy server)
  • Firefox is able to request the URL successfully, curl gets an error
@TvdW TvdW changed the title 'Error in the HTTP2 framing layer' after goaway + http 204 'Error in the HTTP2 framing layer' after goaway Aug 26, 2019
@bagder bagder added the HTTP/2 label Aug 26, 2019
@bagder bagder self-assigned this Aug 26, 2019
Copy link

@TvdW TvdW commented Aug 26, 2019

This initially only looked reproducible for a 204, but further testing shows it also happens on a 200, so I've updated the code to do that instead (keep it as simple as possible, etc)

Copy link

@bagder bagder commented Aug 26, 2019

Yeah, I think it is entirely response code agnostic. I have a local fix that I'm testing, pull request coming up soon.

bagder added a commit that referenced this issue Aug 26, 2019
It could otherwise return an error even when closed correctly if GOAWAY
had been received previously.

Reported-by: Tom van der Woerdt
Fixes #4267
@bagder bagder closed this in c1b6a38 Aug 26, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Nov 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants
You can’t perform that action at this time.