Welcome! Log In Create A New Profile


weird behavior - race condition ?

Matthieu Tourne
March 27, 2011 04:32AM
Hi all,

I just found a weird behavior in nginx, which looks like a race condition.

I'm using an unmodified nginx 0.9.6 with no option on the ./configure line
and the config is pretty much the default except for those 2 directives in
the http section :

client_max_body_size 20M;
client_body_in_single_buffer on;

I have the "location ~ \.php$" enabled and a simple script called
print_post.php which contains :
<?php print_r($_POST); ?>

let's curl it to see if this works :
curl 'http://localhost/print_post.php' -F 'file=@/path/to/15M_file' -F

it shows as you would expect :
[foo] => bar

now let's use HTTP 1.0 (with the -0 option for curl):
curl 'http://localhost/print_post.php' -F 'file=@/path/to/15M_file' -F
'foo=bar' -0
sometimes I get the expected result, and some other times just an empty
array :

strangely this doesn't seem to occur with HTTP 1.1, and seems to go away if
I don't use "client_body_in_single_buffer on;"

can anybody reproduce this ?

Thank you,
nginx-devel mailing list
Subject Author Views Posted

weird behavior - race condition ?

Matthieu Tourne 1584 March 27, 2011 04:32AM

Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 70
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready