cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: http/2 multiple post requests

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 10 Oct 2014 14:34:24 +0200 (CEST)

On Wed, 8 Oct 2014, Scott Mitchell wrote:

> I found where the PROTOCOL_EXCEPTION exception is being generated in the

> 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.

But why is it -1 there? That would indicate that there was no :status
header? At least that's what the code assumes and why it tries to reset the
stream there.

> 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.

I'm not sure either because I've not seen the code flow of this problem.
status_code is meant to be -1 until the proper one is found in the :status
header. And since :status is the first header, finding another header with
status_code set to -1 signifies an error!

> It seems like there should be a collection of these (1 per stream) and not
> just one for the whole connection?

No. First, we only deal with a single stream at a time on a connection for
now. Then, to support multiple streams the plan is to do that using multiple
easy handles that hold one stream each all using the same physical connection.
Similar to how pipelining works for HTTP 1.1 within libcurl today.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
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-10