From 4f8c41cf6110fdf3dd754e2eeb288b7f0cc41b24 Mon Sep 17 00:00:00 2001 From: Unbit Date: Sun, 6 Apr 2014 10:15:24 +0200 Subject: [PATCH] fix headers parsing in http router --- plugins/http/http.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/http/http.c b/plugins/http/http.c index 056495b0..a960e1bc 100644 --- a/plugins/http/http.c +++ b/plugins/http/http.c @@ -685,9 +685,6 @@ ssize_t http_parse(struct corerouter_peer *main_peer) { struct corerouter_session *cs = main_peer->session; struct http_session *hr = (struct http_session *) cs; - // ensure the headers timeout is honoured - http_set_timeout(main_peer, uhttp.headers_timeout); - // is it http body ? if (hr->rnrn == 4) { // something bad happened in keepalive mode... @@ -722,6 +719,9 @@ ssize_t http_parse(struct corerouter_peer *main_peer) { return 1; } + // ensure the headers timeout is honoured + http_set_timeout(main_peer, uhttp.headers_timeout); + // read until \r\n\r\n is found size_t j; size_t len = main_peer->in->pos;