curl-users
Re: http/2 multiple post requests
Date: Wed, 8 Oct 2014 14:33:09 -0400
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? Daniel - any thoughts?
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.
-------------------------------------------------------------------
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-10-08