diff options
| author | Matthew Dempsky <mdempsky@google.com> | 2023-08-24 23:14:43 -0700 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2023-08-25 17:57:42 +0000 |
| commit | 777e65feb613ee1c8e2cdd165fd1fbe972f63451 (patch) | |
| tree | 97c0befceb41d78235752cf43c7e1420ff2b7abe /src/net/http/cgi | |
| parent | 24b9ef1a7366fe751880ab2098cff630144b8ac8 (diff) | |
| download | go-777e65feb613ee1c8e2cdd165fd1fbe972f63451.tar.xz | |
net/http/cgi: workaround for closure inlining issue
This is a temporary workaround for issue #62277, to get the longtest
builders passing again. As mentioned on the issue, the underlying
issue was present even before CL 522318; it just now affects inlined
closures in initialization expressions too, not just explicit init
functions.
This CL can and should be reverted once that issue is fixed properly.
Change-Id: I612a501e131d1b5eea648aafeb1a3a3fe8fe8c83
Reviewed-on: https://go-review.googlesource.com/c/go/+/522935
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'src/net/http/cgi')
| -rw-r--r-- | src/net/http/cgi/host.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/net/http/cgi/host.go b/src/net/http/cgi/host.go index 073952a7bd..a3fba4b413 100644 --- a/src/net/http/cgi/host.go +++ b/src/net/http/cgi/host.go @@ -35,7 +35,10 @@ import ( var trailingPort = regexp.MustCompile(`:([0-9]+)$`) -var osDefaultInheritEnv = func() []string { +var osDefaultInheritEnv = getOSDefaultInheritEnv() + +// TODO(mdempsky): Revert CL 522935 after #62277 is fixed. +func getOSDefaultInheritEnv() []string { switch runtime.GOOS { case "darwin", "ios": return []string{"DYLD_LIBRARY_PATH"} @@ -51,7 +54,7 @@ var osDefaultInheritEnv = func() []string { return []string{"SystemRoot", "COMSPEC", "PATHEXT", "WINDIR"} } return nil -}() +} // Handler runs an executable in a subprocess with a CGI environment. type Handler struct { |
