cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: left for http2

From: Tatsuhiro Tsujikawa <tatsuhiro.t_at_gmail.com>
Date: Sat, 1 Feb 2014 17:19:34 +0900

On Fri, Jan 31, 2014 at 7:50 AM, Daniel Stenberg <daniel_at_haxx.se> wrote:

> Hiya,
>
> Some http2 things to work on next:
>
> 1 - send the request using plain HTTP2 HEADERS when connecting over
> https://
> (and when using re-used http2)
>
> 2 - work on the *POSTFIELDS, *PUT, *FORMPOST etc operations when using
> http2
>
> 3 - set up a test server (probably based on nghttp2 code as well) and
> write a first http2 test case and then add more tests
>
> 4 - write NPN / ALPN logic for gnutls and NSS
>
> I'm spending this weekend at FOSDEM so I won't do much more http2 work
> until next week.
>
>
I'd like to add 5th item.

5 - Pass HTTP/1 status line to HTTP parser reliably

Currently, we copy the header name/value pair emitted by nghttp2 to fixed
buffer and pass it
to the upper layer. We special case ":status" header field to produce
HTTP/1 status line.
The thing is that ":status" header field is not always emitted first.
Luckily nghttp2 server and
twitter emit it first for the first request, so our implementation works.
 But generally speaking, the order of emission is undefined for HTTP2 HPACK
specification.
It looks like Microsoft Katana server emits :status header field last.
I don't have good idea other than buffering up whole header set and detect
:status and produce
status line. Maybe we can do a hack to leave room for status line
("HTTP/2.0 "+3 digits +"\r\n")
to reduce copying. But it seems to me buffering up all header block is
inevitable.
What do you think about this issue?

Best regards,
Tatsuhiro Tsujikawa

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