[git commit] httpd: do not set alarm() timeout if we read cached header
Denys Vlasenko
vda.linux at googlemail.com
Fri Apr 19 12:03:37 UTC 2019
commit: https://git.busybox.net/busybox/commit/?id=af6012a1a7dcfc8eb2321e3adaaae3a0778d5a15
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
networking/httpd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/networking/httpd.c b/networking/httpd.c
index d06bc2776..aa8ce8dcb 100644
--- a/networking/httpd.c
+++ b/networking/httpd.c
@@ -1253,10 +1253,10 @@ static unsigned get_line(void)
unsigned count;
char c;
- alarm(HEADER_READ_TIMEOUT);
count = 0;
while (1) {
if (hdr_cnt <= 0) {
+ alarm(HEADER_READ_TIMEOUT);
hdr_cnt = safe_read(STDIN_FILENO, hdr_buf, sizeof_hdr_buf);
if (hdr_cnt <= 0)
goto ret;
More information about the busybox-cvs
mailing list