nginx perl cgi

Denis S. Filimonov den.lists at gmail.com
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 http://wiki.codemongers.com/NginxSimpleCGI
> 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 perl-fcgi.pl 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


-- 
Denis.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fastcgi-wrapper.pl
Type: application/x-perl
Size: 3288 bytes
Desc: not available
URL: <http://nginx.org/pipermail/nginx/attachments/20080313/6f909ea7/attachment.bin>


More information about the nginx mailing list