nginx perl cgi

Denis S. Filimonov den.lists at
Thu Mar 13 20:23:20 MSK 2008

I had the same problem some time ago.
The problem with this script is that it violates CGI specifications regarding 
POST requests. POSTed data must come to a CGI app from the standard input 
while this script parses the input and sets variables as if they came via a 
GET request, passing nothing to app's stdin. Thus, applications that follow 
specs strictly and expect POST data from stdin, fail.

I've modified the script to fix the problem, feel free to use it.

On Thursday 13 March 2008 08:15:34 Renaud Allard wrote:
> Hello,
> I have some problems running (perl) cgi scripts with nginx.
> I followed the config at
> Perl scripts work very well as long as they use method=get in forms. If
> they use method=post, it seems no input is passed to the cgi.
> I saw in that there was some lines: "if
> (($req_params{'REQUEST_METHOD'} eq 'POST') && ($req_len != 0) ){ "
> Which should pass the info
> Has someone an idea of what's happening?
> Regards

-------------- next part --------------
A non-text attachment was scrubbed...
Type: application/x-perl
Size: 3288 bytes
Desc: not available
URL: <>

More information about the nginx mailing list