cURL cURL > Mailing List > Monthly Index > Single Mail

curl-tracker Archives

[curl:bugs] #1432 HTTP/2 --next flag extra connections and duplicate requests

From: Scott Mitchell <scottmitch3_at_users.sf.net>
Date: Thu, 09 Oct 2014 13:55:09 +0000

I had posted this to the mailing list but it may be more appropraite to put it directly in the issue:

I found where the PROTOCOL_EXCEPTION exception is being generated in the curl code. The following if statement is evaluating to true and is resulting in a protocol error being sent
https://github.com/bagder/curl/blob/7d9bef9286cd8efbed032d41a36e82d1c44058a7/lib/http2.c#L484? Each response has a ":status" header and also some other headers (content-type, custom "x-" extension headers, etc...) this check is evaluating to true because `c->status_code == -1` is true.

`status_code` is reset to -1 here https://github.com/bagder/curl/blob/7d9bef9286cd8efbed032d41a36e82d1c44058a7/lib/http2.c#L984 and here https://github.com/bagder/curl/blob/7d9bef9286cd8efbed032d41a36e82d1c44058a7/lib/http2.c#L251. The issue is both of these lines are hit in between receiving the ":status" header and the next headers for a given stream. I am not sure what the fix would be because I am a bit confused about the granularity of the `http_conn` object within the connectdata structure. It seems like there should be a collection of these (1 per stream) and not just one for the whole connection?

Additional information

The `Curl_http2_setup(...)` method is being called here https://github.com/bagder/curl/blob/7d9bef9286cd8efbed032d41a36e82d1c44058a7/lib/http.c#L1765 in between processing streams on a given connection.

---
** [bugs:#1432] HTTP/2 --next flag extra connections and duplicate requests**
**Status:** pending
**Labels:** http2 
**Created:** Tue Oct 07, 2014 06:14 PM UTC by Scott Mitchell
**Last Updated:** Tue Oct 07, 2014 06:36 PM UTC
**Owner:** Daniel Stenberg
The --next flag for HTTP/2 is openeing an extra connection and duplicates requests on the second connection.
The scenario is described here: http://curl.haxx.se/mail/archive-2014-10/0008.html.
---
Sent from sourceforge.net because curl-tracker@cool.haxx.se is subscribed to https://sourceforge.net/p/curl/bugs/
To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/curl/admin/bugs/options.  Or, if this is a mailing list, you can unsubscribe from the mailing list.
Received on 2014-10-09

These mail archives are generated by hypermail.