Revert "net/http/cgi: workaround for closure inlining issue"

This reverts CL 522935.

Issue #62277 is fixed, the workaround can be dropped.

Updates #62277

Change-Id: I7c69e35248942b4d4fcdd81121051cca9b098980
Reviewed-on: https://go-review.googlesource.com/c/go/+/523175
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
This commit is contained in:
Cuong Manh Le 2023-08-26 08:08:30 +07:00 committed by Gopher Robot
parent 079c0441d5
commit ff00fdfdbe
1 changed files with 2 additions and 5 deletions

View File

@ -35,10 +35,7 @@ import (
var trailingPort = regexp.MustCompile(`:([0-9]+)$`)
var osDefaultInheritEnv = getOSDefaultInheritEnv()
// TODO(mdempsky): Revert CL 522935 after #62277 is fixed.
func getOSDefaultInheritEnv() []string {
var osDefaultInheritEnv = func() []string {
switch runtime.GOOS {
case "darwin", "ios":
return []string{"DYLD_LIBRARY_PATH"}
@ -54,7 +51,7 @@ func getOSDefaultInheritEnv() []string {
return []string{"SystemRoot", "COMSPEC", "PATHEXT", "WINDIR"}
}
return nil
}
}()
// Handler runs an executable in a subprocess with a CGI environment.
type Handler struct {