Welcome! Log In Create A New Profile


How to nph (non parsed headers) with nginx ?

Posted by obh 
How to nph (non parsed headers) with nginx ?
October 29, 2009 09:44AM

I'm trying to use nginx in a looking glass (traceroute, ping) application requiring use of
non-parsed headers (nph) - but can't get it to work.

Using strace and enabling debug error.log I see that nginx are receiving all the headers
from the fastcgi server. But nginx does not write the header further to the client.

What am I missing? Does anybody have any working examples?

Kind regards,

Ole Bjørn Hessen.

I'm using fastcgi module like this:

location /cgi-bin {
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
include fastcgi_params;

The fast cgi server below.


use FCGI;
use CGI;

my $q = CGI->new;

my $count = 0;

my $socket = FCGI::OpenSocket( "", 10 );

my $request = FCGI::Request( \*STDIN, \*STDOUT, \*STDERR, \%req_params, $socket );
while($request->Accept() >= 0)
$| = 1;
print $q->header(-nph => 1);
print "<pre>\n";
for (my $i = 0; $i <= 10; $i++) {
print "hei ", scalar(localtime(time)), " $count\n";
print "</pre>\n";
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 269
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready