Weird behavior - race condition?

Hi all,

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

I’m using an unmodified nginx 0.9.6 with no option on the ./configure
and the config is pretty much the default except for those 2 directives
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 ‘[email protected]/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 ‘[email protected]/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
I don’t use “client_body_in_single_buffer on;”

can anybody reproduce this ?

Thank you,

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs