From c7f8a1292544c8981eb1c35394d5b50100fe1790 Mon Sep 17 00:00:00 2001 From: tjpcc Date: Tue, 2 May 2023 08:56:27 -0600 Subject: send request bodies into CGI handlers --- contrib/cgi/cgi.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contrib/cgi/cgi.go b/contrib/cgi/cgi.go index 9511ac5..bcdd5e1 100644 --- a/contrib/cgi/cgi.go +++ b/contrib/cgi/cgi.go @@ -115,6 +115,9 @@ func RunCGI( cmd.Env = prepareCGIEnv(ctx, request, scriptName, pathInfo) cmd.Dir = dirPath + if body, ok := request.Meta.(io.Reader); ok { + cmd.Stdin = body + } responseBuffer := &bytes.Buffer{} cmd.Stdout = responseBuffer -- cgit v1.2.3