summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authortjpcc <tjp@ctrl-c.club>2023-05-02 08:56:27 -0600
committertjpcc <tjp@ctrl-c.club>2023-05-02 08:56:27 -0600
commitc7f8a1292544c8981eb1c35394d5b50100fe1790 (patch)
treefa9a4ac587ebdf8c965ea4ea69ce6e6664baded2 /contrib
parent33d0199bbeb068a45a411c5f8dba77f6574656ad (diff)
send request bodies into CGI handlers
Diffstat (limited to 'contrib')
-rw-r--r--contrib/cgi/cgi.go3
1 files changed, 3 insertions, 0 deletions
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