cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: spin when http/2 connection is closed prematurely

From: Tatsuhiro Tsujikawa <tatsuhiro.t_at_gmail.com>
Date: Sat, 13 Sep 2014 12:06:57 +0900

On Sat, Sep 13, 2014 at 4:07 AM, Brad Fitzpatrick <bradfitz_at_golang.org>
wrote:

> I'm using curl with nghttp2 for integration tests with development of Go's
> http2 support. I'm building curl like:
> https://github.com/bradfitz/http2/blob/master/Dockerfile (curl
> curl-7.38.0)
>
> There seems to be a bug with curl's use of nghttp2.
>
> If the server closes the connection prematurely (after NPN/ALPN
> negotiation but before sending any http/2 frames), curl --http2 -v spins
> forever with:
>
> * nghttp2_session_mem_recv() returns 0
> * http2_recv: 16384 bytes buffer
> * nread=0
>

​Thank you for reporting this bug.
The attached patch will fix this issue. Simply we did not handle EOF case..

Best regards,
Tatsuhiro Tsujikawa​

> * nghttp2_session_mem_recv() returns 0
> * http2_recv: 16384 bytes buffer
> * nread=0
> * nghttp2_session_mem_recv() returns 0
> * http2_recv: 16384 bytes buffer
> * nread=0
> * nghttp2_session_mem_recv() returns 0
> * http2_recv: 16384 bytes buffer
> * nread=0
> * nghttp2_session_mem_recv() returns 0
> * http2_recv: 16384 bytes buffer
> * nread=0
> * nghttp2_session_mem_recv() returns 0
> * http2_recv: 16384 bytes buffer
> * nread=0
> * nghttp2_session_mem_recv() returns 0
> * http2_recv: 16384 bytes buffer
> * nread=0
> * nghttp2_session_mem_recv() returns 0
> * http2_recv: 16384 bytes buffer
> * nread=0
> * nghttp2_session_mem_recv() returns 0
> * http2_recv: 16384 bytes buffer
> * nread=0
> * nghttp2_session_mem_recv() returns 0
> * http2_recv: 16384 bytes buffer
> * nread=0
> * nghttp2_session_mem_recv() returns 0
> * http2_recv: 16384 bytes buffer
> * nread=0
> * nghttp2_session_mem_recv() returns 0
> * http2_recv: 16384 bytes buffer
> * nread=0
>
> etc
>
> I'll work around this with a wrapper, but seems like something curl should
> fix.
>
> Let me know if you'd prefer that I file a bug.
>
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-users
> FAQ: http://curl.haxx.se/docs/faq.html
> Etiquette: http://curl.haxx.se/mail/etiquette.html
>
>

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html

Received on 2014-09-13