From 0af117d47f8a34dadd82554381f6c5a2275a79de Mon Sep 17 00:00:00 2001 From: Thomas Porzelt Date: Sun, 4 Apr 2010 17:11:57 +0200 Subject: [PATCH] [core] Reposition check for header size limit fixing wrong positives --- src/main/connection.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/connection.c b/src/main/connection.c index 866ae4a..20304d1 100644 --- a/src/main/connection.c +++ b/src/main/connection.c @@ -169,10 +169,14 @@ static gboolean connection_handle_read(liConnection *con) { } if (con->state == LI_CON_STATE_READ_REQUEST_HEADER && con->mainvr->state == LI_VRS_CLEAN) { + liHandlerResult res; + if (CORE_OPTION(LI_CORE_OPTION_DEBUG_REQUEST_HANDLING).boolean) { VR_DEBUG(vr, "%s", "reading request header"); } + res = li_http_request_parse(con->mainvr, &con->req_parser_ctx); + /* max uri length 8 kilobytes */ if (vr->request.uri.raw->len > 8*1024) { VR_INFO(vr, @@ -204,7 +208,7 @@ static gboolean connection_handle_read(liConnection *con) { return TRUE; } - switch(li_http_request_parse(con->mainvr, &con->req_parser_ctx)) { + switch(res) { case LI_HANDLER_GO_ON: break; /* go on */ case LI_HANDLER_WAIT_FOR_EVENT: