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&#39;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 &quot;location ~ \.php$&quot; enabled and a simple script called print_post.php which contains :</div>

<div>&lt;?php print_r($_POST); ?&gt;</div><div><br></div><div>let&#39;s curl it to see if this works :</div><div>curl &#39;<a href="http://localhost/print_post.php">http://localhost/print_post.php</a>&#39; -F &#39;file=@/path/to/15M_file&#39; -F &#39;foo=bar&#39;</div>

<div><br></div><div>it shows as you would expect :</div><div><div>Array</div><div>(</div><div>    [foo] =&gt; bar</div><div>)</div></div><div><br></div><div>now let&#39;s use HTTP 1.0 (with the -0 option for curl):</div>
<div>
<meta charset="utf-8"><div>curl &#39;<a href="http://localhost/print_post.php">http://localhost/print_post.php</a>&#39; -F &#39;file=@/path/to/15M_file&#39; -F &#39;foo=bar&#39; -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&#39;t seem to occur with HTTP 1.1, and seems to go away if I don&#39;t use &quot;client_body_in_single_buffer on;&quot;</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>