Hi all,<div><br></div><div>I just found a weird behavior in nginx, which looks like a race condition.</div><div><br></div><div>I'm using an unmodified nginx 0.9.6 with no option on the ./configure line </div><div>and the config is pretty much the default except for those 2 directives in the http section :</div>
<div><br></div><div><div>client_max_body_size 20M;</div><div>client_body_in_single_buffer on;</div></div><div><br></div><div><br></div><div>I have the "location ~ \.php$" enabled and a simple script called print_post.php which contains :</div>
<div><?php print_r($_POST); ?></div><div><br></div><div>let's curl it to see if this works :</div><div>curl '<a href="http://localhost/print_post.php">http://localhost/print_post.php</a>' -F 'file=@/path/to/15M_file' -F 'foo=bar'</div>
<div><br></div><div>it shows as you would expect :</div><div><div>Array</div><div>(</div><div> [foo] => bar</div><div>)</div></div><div><br></div><div>now let's use HTTP 1.0 (with the -0 option for curl):</div>
<div>
<meta charset="utf-8"><div>curl '<a href="http://localhost/print_post.php">http://localhost/print_post.php</a>' -F 'file=@/path/to/15M_file' -F 'foo=bar' -0 </div></div><div>sometimes I get the expected result, and some other times just an empty array :</div>
<div>Array </div><div>(</div><div>)</div><div><br></div><div>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;"</div><div><br></div>
<div>can anybody reproduce this ?</div><div><br></div><div>Thank you,</div><div>Matthieu.</div><div><br></div><div><br></div>