cURL / Mailing Lists / curl-library / Single Mail

curl-library

Inclusion of Connection-Specific Headers in h2c

From: Samuel Hurst <samuelh_at_rd.bbc.co.uk>
Date: Thu, 13 Nov 2014 16:54:12 +0000

Hi All,

While working with h2c I've come across a bug in the way curl reuses
connections on subsequent requests to a server. Curl keeps
connection-specific headers around in the HEADERS frame for subsequent
requests to the server, in contraction to Section 8.1.2.2 of the HTTP/2
draft.

In my use case, I have a libcurl client using the multi interface
connecting to an nghttpx server via a HTTP/1.1 upgrade connection. The
upgrade succeeds and the response is HTTP/2. However, I am requesting
two files together, so the client sends a HEADERS frame with the next
GET request, but still has the connection:, upgrade: and http2-settings:
headers set in the request. The server rightly responds with a
RST_STREAM frame citing a protocol error, and then curl falls back,
negotiates a new TCP connection and starts the whole HTTP/1.1 upgrade
path again.

I'm running latest releases of libcurl (7.39.0) and nghttp2 (0.6.6) when
I see this behaviour.

Best Regards,
Sam

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-11-13