June 28, 2009 05:42AM
Problem with HEAD solved by setting fastcgi_ignore_client_abort on

But still getting error on POST. Bellow is code. If $num $num < 853 ( POST length < 1025) everything is ok, if $num >= 853 ( POST length >= 1025) getting error.

use IO::Socket::INET;

my $host = "www.server";
my $num = 853;
my $sock = IO::Socket::INET->new(
PeerAddr => $host,
PeerPort => 'http(80)',
Proto => 'tcp'
);
unless ($sock) { die "cannot connect\n" }
my $string = "POST / HTTP/1.1\r\n";
$string .= "Host: ".$host."\r\n";
$string .= "Accept: */*\r\n";
$string .= "Accept-Encoding: identity\r\n";
$string .= "Connection: close\r\n";
$string .= "Content-Type: application/x-www-form-urlencoded\r\n";
$string .= "Content-Length: ".$num."\r\n\r\n";
for (my $i = 0; $i <$num ; $i++) {
$string .= "x";
}
print $sock $string;
# shutdown call creates problems
# if commented works for nginx and apache
# if uncomented works only with apache
shutdown($sock, 1);
while (my $line = <$sock>) {
print $line if $line =~ /^HTTP.*200 OK/;
}
print "Length: ".length($string)."\n";
close $sock;
Subject Author Posted

Apache -> Nginx miration problem. Different tcp options?

atlantos June 28, 2009 12:19AM

Re: Apache -> Nginx miration problem. Different tcp options?

atlantos June 28, 2009 03:37AM

Re: Apache -> Nginx miration problem. Different tcp options?

atlantos June 28, 2009 05:42AM

Re: Apache -> Nginx miration problem. Different tcp options?

Maxim Dounin June 29, 2009 07:51AM

Re: Apache -> Nginx miration problem. Different tcp options?

Nelson Serafica June 28, 2009 08:52AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 200
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