The http.ResonseWriter exposes a UsingTLS() method which is good, but the other info
stored in the tls.Conn structure is not available. Could the interface be
extended/changed to allow access to more of the TLS properties?
(this is related to https://golang.org/issue/155)
Which compiler are you using (5g, 6g, 8g, gccgo)?
6g
Which operating system are you using?
linux,x86_64
Which revision are you using? (hg identify)
d206790cdd7d tip
Please provide any additional information below.
I can "patch in" by creating a custom Listener that mimics the
tls.Listener and gets the information there, but I can't figure out a
way of propagating that info up the stack to the actual handlers
without:
a) hacking in the http/server.go and adding an accessor there similar
to the way UsingTLS() is implemented - which is not real nice I guess.
or b) writing a custom equivalent of http.conn/http.response, which is
a lot of duplicated code.
The text was updated successfully, but these errors were encountered:
This reminds me that I hate the fat ResponseWriter interface, which has several things
that are unrelated to either responses or writing:
RemoteAddr() string
UsingTLS() bool
Hijack() (io.ReadWriteCloser, *bufio.ReadWriter, os.Error)
All of those feel sorely out of place.
mikioh
changed the title
http & tls: make PeerCertificates and other information availabe from within an http Handler
crypto/tls, net/http: make PeerCertificates and other information availabe from within an http Handler
Jan 14, 2015
by mseigneurin@aliceadsl.fr:
The text was updated successfully, but these errors were encountered: