<div class="gmail_quote">On Mon, Nov 19, 2012 at 7:40 PM, Arnaud GRANAL <span dir="ltr"><<a href="mailto:serphen@gmail.com" target="_blank">serphen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="gmail_quote">I guess it was fixed in a recent commit by Maxim:<div></div>[..]<br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">diff --git a/src/http/modules/ngx_http_</span><span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">dav_module.c b/src/http/modules/ngx_http_</span><span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">dav_module.c</span><br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">--- a/src/http/modules/ngx_http_</span><span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">dav_module.c</span><br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">+++ b/src/http/modules/ngx_http_</span><span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">dav_module.c</span><br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">@@ -209,6 +209,11 @@ ngx_http_dav_put_handler(ngx_</span><span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">http_reques</span><br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"> ngx_ext_rename_file_t ext;</span><br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"> ngx_http_dav_loc_conf_t *dlcf;</span><br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">+ if (r->request_body == NULL || r->request_body->temp_file == NULL) {</span><br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">+ ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_</span><span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">ERROR);</span><br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">+ return;</span><br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">+ }</span><br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">+</span><br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"> ngx_http_map_uri_to_path(r, &path, &root, 0);</span><br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><div><span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"> path.len--;</span> <br></div><span><font color="#888888">
</font></span></div></blockquote></div>The problem is that I got this behavior on sequential valid PUT requests. After handling first request, nginx even doesn't try to read body of next request. It just calls ngx_http_dav_put_handler with r->response_body from previous request but with r->response_body->temp_file set to NULL. With extra check for temp_file not being NULL nginx actually reads second request body and handles it properly.<br>
<br>-- <br>Regards,<br>Dmitry<br><br>