From 7f4bb3593e58375319c5d599daf7264b1be51a98 Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Tue, 3 Feb 2009 01:00:42 +1300 Subject: [PATCH] Handle all unknown HTTP/* as HTTP/0.9 Assume that all requests are HTTP/0.9 unless explicity stated otherwise. Drop assert on missing or overflow numeric cases. --- src/HttpMsg.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/HttpMsg.cc b/src/HttpMsg.cc index 4126ef19c7..1585b5225a 100644 --- a/src/HttpMsg.cc +++ b/src/HttpMsg.cc @@ -463,7 +463,7 @@ HttpParserParseReqLine(HttpParser *hmsg) { int i = 0; int retcode = 0; - int maj = -1, min = -1; + unsigned int maj = 0, min = 9; int last_whitespace = -1, line_end = -1; debugs(74, 5, "httpParserParseReqLine: parsing " << hmsg->buf); @@ -605,8 +605,6 @@ HttpParserParseReqLine(HttpParser *hmsg) * Rightio - we have all the schtuff. Return true; we've got enough. */ retcode = 1; - assert(maj != -1); - assert(min != -1); finish: hmsg->v_maj = maj; -- 2.47.2