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 01:15:00 +0900

On Fri, Jan 31, 2014 at 8:14 PM, Fabian Frank <fabian.frank.de_at_gmail.com>wrote:

>
> On Jan 30, 2014, at 2:50 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:
>
> > 1 - send the request using plain HTTP2 HEADERS when connecting over
> https://
> > (and when using re-used http2)
> I have worked on this today and the current progress is attached. Unless
> someone wants to build on top of it, no need to merge, I plan to continue
> cleaning it up and handle stopping the HTTP1 logic correctly as well as
> swapping the send/receive callbacks correctly for SSL connections.
>
>
Good progress. client header and SETTINGS submissions look good.

Coincidentally, I did same approach. Patch is attached below.
The idea is mostly the same, I add some extra code such as converting HTTP
header from curl to HTTP2 format and calls underlying recv/send callback
including TLS and non-TLS.

I send client header and request in http2_send, but this is because I have
no idea where http_conn is initialized. As I commented in the code, it is
cleaner to add dedicated function for HTTP2 request, since http2_send is
also used upload.

Anyway, with this patch, one can transfer contents from https://twitter.com
and from nghttp2 test server in plain HTTP as well, which is pretty good.

The code still has rough edges. The notable one is I could not
figure out how to call nghttp2_session_send() when underlying
socket is writable.

The patch attached.

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-01-31