[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #46888] httpd: fails to send file data prepared during
From: |
Philipp Tölke |
Subject: |
[lwip-devel] [bug #46888] httpd: fails to send file data prepared during http_send_headers |
Date: |
Wed, 13 Jan 2016 08:55:49 +0000 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0 |
URL:
<http://savannah.nongnu.org/bugs/?46888>
Summary: httpd: fails to send file data prepared during
http_send_headers
Project: lwIP - A Lightweight TCP/IP stack
Submitted by: philipptoelke
Submitted on: Wed 13 Jan 2016 08:55:48 AM GMT
Category: Contrib
Severity: 3 - Normal
Item Group: Faulty Behaviour
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Planned Release:
lwIP version: git head
_______________________________________________________
Details:
4023aedb3a2ad3d6ed205dbfbb34bae63a3dc48f seems to have introduced an error
into the httpserver_raw:
The function http_send_headers now calls http_check_eof to "check for data to
send instead of waiting for ACL". The data is prepared in hs->buf/hs->file but
is not sent out in every case; to actually send data, http_send_header has to
return HTTP_DATA_TO_SEND_CONTINUE.
I attached a patch that fixes the return value if data was prepared.
#v+
--- a/src/apps/httpd/httpd.c
+++ b/src/apps/httpd/httpd.c
@@ -916,7 +916,9 @@ http_send_headers(struct tcp_pcb *pcb, struct http_state
*hs)
/* When we are at the end of the headers, check for data to send
* instead of waiting for ACK from remote side to continue
* (which would happen when sending files from async read). */
- http_check_eof(pcb, hs);
+ if(http_check_eof(pcb, hs)) {
+ data_to_send = HTTP_DATA_TO_SEND_CONTINUE;
+ }
}
/* If we get here and there are still header bytes to send, we send
* the header information we just wrote immediately. If there are no
#v-
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Wed 13 Jan 2016 08:55:48 AM GMT Name:
0001-httpd-fix-sending-of-data-from-send_headers.patch Size: 1017B By:
philipptoelke
<http://savannah.nongnu.org/bugs/download.php?file_id=36012>
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?46888>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [lwip-devel] [bug #46888] httpd: fails to send file data prepared during http_send_headers,
Philipp Tölke <=