]> Cypherpunks repositories - gostls13.git/commit
net/http/fcgi: expose cgi env vars in request context
authorMeir Fischer <meirfischer@gmail.com>
Sat, 8 Apr 2017 04:17:01 +0000 (00:17 -0400)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 13 Apr 2017 04:38:23 +0000 (04:38 +0000)
commitaaf4682171f1ffabd3673b82cb71fdc3d8e5317e
tree90446ae4186d555a1db2300eccfbccfcd3830bfc
parent7c3fa418bf662d0499dfb5d6b7367090a76e797f
net/http/fcgi: expose cgi env vars in request context

The current interface can't access all environment
variables directly or via cgi.RequestFromMap, which
only reads variables on its "white list" to be set on
the http.Request it returns. If an fcgi variable is
not on the "white list" - e.g. REMOTE_USER - the old
code has no access to its value.

This passes variables in the Request context that aren't
used to add data to the Request itself and adds a method
that parses those env vars from the Request's context.

Fixes #16546

Change-Id: Ibf933a768b677ece1bb93d7bf99a14cef36ec671
Reviewed-on: https://go-review.googlesource.com/40012
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/go/build/deps_test.go
src/net/http/fcgi/child.go
src/net/http/fcgi/fcgi.go
src/net/http/fcgi/fcgi_test.go