]> Cypherpunks repositories - gostls13.git/commit
net/http: add Server.ServeTLS method
authorNiklas Schnelle <niklas.schnelle@gmail.com>
Mon, 13 Mar 2017 02:13:16 +0000 (07:43 +0530)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 8 Jun 2017 17:45:27 +0000 (17:45 +0000)
commit0b77d3eb009335aaa72205c6642409a5e4a408d6
tree5bd864887e6157d1c78fa92f934c7ad5de550725
parentfab47f7b3a9d8ad91b96bf80f0b9dff2feda31d2
net/http: add Server.ServeTLS method

Server.ServeTLS wraps Server.Serve with added TLS support. This is
particularly useful for serving on manually initialized listeners.
Example use-case includes ability to serve with TLS on listener
provided by systemd's socket activation.

A matching test heavily based on TestAutomaticHTTP2_ListenAndServe
is also included.

Original code by Gurpartap Singh as
https://go-review.googlesource.com/c/38114/

Fixes #13228

Change-Id: I73bb703f501574a84d261c2d7b9243a89fa52d62
Reviewed-on: https://go-review.googlesource.com/44074
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/net/http/serve_test.go
src/net/http/server.go