<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
thank you Jow for the promptly feedback.<br>
I tried to better understand the problem and now I'm reading at your
commit.<br>
My patch works but is logically broken. I'm trying to produce a
better one.<br>
<br>
If I'm not wrong the problem is this (without applying your commit):<br>
the client request handling code go though 3 steps (callback):<br>
CLIENT_STATE_INIT -> client_init_cb ()<br>
CLIENT_STATE_HEADER -> client_header_cb ()<br>
CLIENT_STATE_DATA -> client_data_cb ()<br>
<br>
actually in the INIT portion we test for the http_code 204 or 304
but this is wrong,<br>
we still don't know if the client cached file is updated or not and
I think the chunking<br>
code apply only to data, not headers. a 204 message have no data.<br>
this test should be done in the HEADER phase (uf_file_data call
-> uf_file_if_unmodified_since)<br>
<br>
If for testing purpose we completely skip this test I think it's
safe because in the<br>
HEADER phase (file.c line 617) if we are going to handle a file
request we disable<br>
chunked writes. If we are going to handle a script this does not
happens.<br>
<br>
to this add the fact that when we are going to execute a script
after a file has been<br>
handled there is no place where cl->http_code get resetted. this
trigger the bug. <br>
(for scripts only req->redirect_status = 200 is executed, file.c
line 827)<br>
<br>
I'm going to try a new simple patch and then your suggested one.<br>
I will update you.<br>
<br>
regards<br>
Luigi <br>
<br>
<br>
<div class="moz-cite-prefix">On 10/08/2015 12:21 AM, Jo-Philipp Wich
wrote:<br>
</div>
<blockquote cite="mid:56159AD4.1050207@openwrt.org" type="cite">
<pre wrap="">Hi Luigi,
thank you for your patch proposal, it prompted me to take a deeper look
into the problem.
The issue should be fixed with the following commit:
<a class="moz-txt-link-freetext" href="http://nbd.name/gitweb.cgi?p=uhttpd2.git;a=commitdiff;h=7ed2edc40dd6d0171266f3bfbc96466e1d25e3cd">http://nbd.name/gitweb.cgi?p=uhttpd2.git;a=commitdiff;h=7ed2edc40dd6d0171266f3bfbc96466e1d25e3cd</a>
Regards,
Jow
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
openwrt-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:openwrt-devel@lists.openwrt.org">openwrt-devel@lists.openwrt.org</a>
<a class="moz-txt-link-freetext" href="https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel">https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel</a>
</pre>
</blockquote>
<br>
</body>
</html>