Skip to content
This repository has been archived by the owner on Jan 24, 2019. It is now read-only.

Simplify HTTPS listening, leverage net/http methods #167

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

artyom
Copy link

@artyom artyom commented Nov 11, 2015

Make use of net/http Server.ListenAndServeTLS — this gives upcoming
http2 support in Go 1.6 for free.

Make use of net/http Server.ListenAndServeTLS — this gives upcoming
http2 support in Go 1.6 for free.
@jehiah
Copy link
Member

jehiah commented Nov 16, 2015

@artyom can you clarify for me why Server.Serve() wouldn't support http2 automatically?

@artyom
Copy link
Author

artyom commented Nov 16, 2015

At least current http.Server implementation calls private method setupHTTP2 which can only be applied in a meaningful way when tls.Listener is set up by Server.ListenAndServeTLS, since setupHTTP2 calls http2ConfigureServer performing a lot of low-level setup on Server.TLSConfig which is ignored if Server is started on pre-established TLS connection.

@jehiah
Copy link
Member

jehiah commented Nov 16, 2015

Thanks for the pointers. I've not familiarized myself with the hooks/implications w/r/t http2 as that has started to land in golang tip.

I'll try to familiarize myself w/ the implications of http2 support in net/http and check back in here soon.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging this pull request may close these issues.

2 participants