diff options
author | tjpcc <tjp@ctrl-c.club> | 2023-05-02 08:56:27 -0600 |
---|---|---|
committer | tjpcc <tjp@ctrl-c.club> | 2023-05-02 08:56:27 -0600 |
commit | c7f8a1292544c8981eb1c35394d5b50100fe1790 (patch) | |
tree | fa9a4ac587ebdf8c965ea4ea69ce6e6664baded2 /contrib/cgi/cgi.go | |
parent | 33d0199bbeb068a45a411c5f8dba77f6574656ad (diff) |
send request bodies into CGI handlers
Diffstat (limited to 'contrib/cgi/cgi.go')
-rw-r--r-- | contrib/cgi/cgi.go | 3 |
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 |