Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
supporting HTTP/2. #399
This patch implements HTTP/2 (RFC 7540).
This code passes the following three tests:
Recent Firefox and Chrome supports HTTP/2 over TLS. With this patch, WarpTLS automatically communicates with Firefox and Chrome in HTTP/2. There is no settings to disable HTTP/2 at this moment. We should implement them if necessary.
The following picture illustrates rough architecture:
In HTTP/2, multiple streams are asynchronously sent over a TCP connection.
One concern: the number of worker threads in the worker pool is now hard coded -- 10. Unlike ResponseFile and ResponseBuilder, ResponseStream occupies the worker thread. So, if 10 streamings are served, no worker is available. We should fix this if necessary.
@snoyberg Please review and merge this if you think OK.
I got the following when trying to test this:
Very cool. I don't have anything to add but I was able to compile and
On Tue, Jul 14 2015, Kazu Yamamoto firstname.lastname@example.org wrote:
Awesome work, @kazu-yamamoto!
This bit worried me:
Then I read the source code: the 10 worker threads are per connection, not global :). So the only concern should be resource usage.
No. I have not implemented HTTP/2 client side. So, I cannot automate testing at this moment.
Rather, I manually test the HTTP/2 feature with Firefox, h2spec and nghttp as mentioned above.
added a commit
this pull request
Jul 16, 2015
Jul 16, 2015
That's perfect. Should we release this to Hackage, perhaps with a caveat
On Thu, Jul 16, 2015, 6:01 PM Kazu Yamamoto email@example.com
Cool, feel free to do so yourself, or just ping me and I'll do the release.
On Thu, Jul 16, 2015 at 6:10 PM Kazu Yamamoto firstname.lastname@example.org