From 33648cc286e812a8603743c29e96830de3b4acb8 Mon Sep 17 00:00:00 2001 From: tjpcc Date: Sat, 9 Sep 2023 08:42:21 -0600 Subject: log stderr on failed CGIs --- contrib/cgi/cgi.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'contrib/cgi/cgi.go') 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 { -- cgit v1.2.3