summaryrefslogtreecommitdiff
path: root/contrib/cgi/cgi.go
diff options
context:
space:
mode:
authortjpcc <tjp@ctrl-c.club>2023-09-09 08:42:21 -0600
committertjpcc <tjp@ctrl-c.club>2023-09-09 08:42:21 -0600
commit33648cc286e812a8603743c29e96830de3b4acb8 (patch)
tree2253b0c71035f866fb14e6692baf5587b1925fb4 /contrib/cgi/cgi.go
parent195bdb565e9cb46e8d88ee364dcfc96a65a7159a (diff)
log stderr on failed CGIs
Diffstat (limited to 'contrib/cgi/cgi.go')
-rw-r--r--contrib/cgi/cgi.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/contrib/cgi/cgi.go b/contrib/cgi/cgi.go
index 749a284..de0d35f 100644
--- a/contrib/cgi/cgi.go
+++ b/contrib/cgi/cgi.go
@@ -88,6 +88,7 @@ func RunCGI(
request *sr.Request,
executable string,
pathInfo string,
+ stderr io.Writer,
) (*bytes.Buffer, int, error) {
pathSegments := strings.Split(executable, "/")
@@ -114,6 +115,7 @@ func RunCGI(
}
responseBuffer := &bytes.Buffer{}
cmd.Stdout = responseBuffer
+ cmd.Stderr = stderr
err := cmd.Run()
if err != nil {