From a70ba6c625bee1ee0928f0a62919a5ffc46b9f74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20B=C3=BChler?= Date: Mon, 28 Jul 2008 08:43:23 +0000 Subject: [PATCH] Fix scgi HTTP/1.* status parsing (#1638), found by met@uberstats.com git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2223 152afb58-edef-0310-8abb-c4023f1b3aa9 --- NEWS | 1 + src/mod_scgi.c | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 6ccae79d..662bac22 100644 --- a/NEWS +++ b/NEWS @@ -30,6 +30,7 @@ NEWS * close connection after redirect in trigger_b4_dl (thx icy) * close connection in mod_magnet if returned status code * fix bug with IPv6 in mod_evasive (#1579) + * fix scgi HTTP/1.* status parsing (#1638), found by met@uberstats.com - 1.4.19 - 2008-03-10 diff --git a/src/mod_scgi.c b/src/mod_scgi.c index 2122af91..9b2b3256 100644 --- a/src/mod_scgi.c +++ b/src/mod_scgi.c @@ -1686,9 +1686,8 @@ static int scgi_response_parse(server *srv, connection *con, plugin_data *p, buf status = strtol(s+9, NULL, 10); - if (con->http_status >= 100 && - con->http_status < 1000) { - /* we expected 3 digits and didn't got them */ + if (status >= 100 && status < 1000) { + /* we expected 3 digits got them */ con->parsed_response |= HTTP_STATUS; con->http_status = status; }