diff options
Diffstat (limited to 'plugins/cgi/cgi.cpp')
-rw-r--r-- | plugins/cgi/cgi.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/plugins/cgi/cgi.cpp b/plugins/cgi/cgi.cpp index 9b06f7a..561e6ad 100644 --- a/plugins/cgi/cgi.cpp +++ b/plugins/cgi/cgi.cpp @@ -181,6 +181,7 @@ namespace { bp::child child(filename.string(), env, (bp::std_out & bp::std_err) > is_out, bp::std_in < is_in); is_in << context.GetRequestParam("body"); + is_in.close(); std::string output; std::string line; @@ -252,11 +253,6 @@ std::string cgi_plugin::generate_page( ) { try { - // Make sure we can handle the method - std::string method {GetRequestParam("method")}; - if (method != "GET" && method != "HEAD") - return HttpStatus("400", "Unknown HTTP method", SetResponseHeader); - // Request path must not contain "..". std::string rel_target{GetRequestParam("rel_target")}; size_t query_pos{rel_target.find("?")}; |