summaryrefslogtreecommitdiff
path: root/src/net/http/fcgi
Commit message (Collapse)AuthorAgeFilesLines
* net/http/fcgi: expose cgi env vars in request contextMeir Fischer2017-04-133-1/+123
| | | | | | | | | | | | | | | | | | | | | 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>
* net/http/fcgi: fix link to protocol docsBrad Fitzpatrick2016-11-071-1/+5
| | | | | | | | Fixes #17815 Change-Id: I766082d28a14c77f5dfb6cd1974b86cb0a8fe31a Reviewed-on: https://go-review.googlesource.com/32852 Reviewed-by: Minux Ma <minux@golang.org>
* all: delete dead non-test codeDominik Honnef2016-03-251-7/+0
| | | | | | | | | | | | | | | | | | | | | | | This change removes a lot of dead code. Some of the code has never been used, not even when it was first commited. The rest shouldn't have survived refactors. This change doesn't remove unused routines helpful for debugging, nor does it remove code that's used in commented out blocks of code that are only unused temporarily. Furthermore, unused constants weren't removed when they were part of a set of constants from specifications. One noteworthy omission from this CL are about 1000 lines of unused code in cmd/fix, 700 lines of which are the typechecker, which hasn't been used ever since the pre-Go 1 fixes have been removed. I wasn't sure if this code should stick around for future uses of cmd/fix or be culled as well. Change-Id: Ib714bc7e487edc11ad23ba1c3222d1fd02e4a549 Reviewed-on: https://go-review.googlesource.com/20926 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
* net/http/fcgi: fix panic with malformed params recordDidier Spezia2015-09-272-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | As stated in FastCGI specifications: FastCGI transmits a name-value pair as the length of the name, followed by the length of the value, followed by the name, followed by the value. The current implementation trusts the name and value length provided in the record, leading to a panic if the record is malformed. Added an explicit check on the lengths. Test case and fix suggested by diogin@gmail.com (Jingcheng Zhang) Fixes #11824 Change-Id: I883a1982ea46465e1fb02e0e02b6a4df9e529ae4 Reviewed-on: https://go-review.googlesource.com/15015 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
* net/http/fcgi: fix race between serveRequest and cleanUpBrad Fitzpatrick2015-07-111-0/+2
| | | | | | | | | | Fixes #11552 Change-Id: I87904e9e3fb4bd1fb4c7075a4e2d0151e5bd37df Reviewed-on: https://go-review.googlesource.com/11890 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com> Reviewed-by: David Crawshaw <crawshaw@golang.org>
* net/http/fcgi: fix testDmitry Vyukov2015-03-021-1/+3
| | | | | | | | | | | | | | | | | Currently the test fails if run more than once: $ go test -v -run=TestChildServeCleansUp -cpu=1,1 net/http/fcgi === RUN TestChildServeCleansUp --- PASS: TestChildServeCleansUp (0.00s) === RUN TestChildServeCleansUp fatal error: all goroutines are asleep - deadlock! The problem is that the writer mutates test input data, so it is wrong on the second execution. Change-Id: I4ca54dd2926c6986b2908023ac65e5e65630ed26 Reviewed-on: https://go-review.googlesource.com/6383 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* net/http/fcgi: Fix resource leaksEvan Kroske2015-01-192-1/+126
| | | | | | | | | | | Close the pipe for the body of a request when it is aborted and close all pipes when child.serve terminates. Fixes #6934 Change-Id: I1c5e7d2116e1ff106f11a1ef8e99bf70cf04162a Reviewed-on: https://go-review.googlesource.com/1923 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* build: move package sources from src/pkg to srcRuss Cox2014-09-083-0/+729
Preparation was in CL 134570043. This CL contains only the effect of 'hg mv src/pkg/* src'. For more about the move, see golang.org/s/go14nopkg.