From 379e22a4c0c00193b16fec3c46c4b68cdb63ee1a Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 11 Feb 2012 21:25:57 +0100 Subject: remove the arbitrary MAXLEN limit for response lines (Closes: #658346) --- methods/http.cc | 4 ---- methods/http.h | 4 +--- methods/https.h | 2 -- 3 files changed, 1 insertion(+), 9 deletions(-) (limited to 'methods') diff --git a/methods/http.cc b/methods/http.cc index 2721b1224..7ddf8e045 100644 --- a/methods/http.cc +++ b/methods/http.cc @@ -534,10 +534,6 @@ bool ServerState::HeaderLine(string Line) if (Line.empty() == true) return true; - // The http server might be trying to do something evil. - if (Line.length() >= MAXLEN) - return _error->Error(_("Got a single header line over %u chars"),MAXLEN); - string::size_type Pos = Line.find(' '); if (Pos == string::npos || Pos+1 > Line.length()) { diff --git a/methods/http.h b/methods/http.h index c73d4df5c..c061ad680 100644 --- a/methods/http.h +++ b/methods/http.h @@ -11,8 +11,6 @@ #ifndef APT_HTTP_H #define APT_HTTP_H -#define MAXLEN 360 - #include #include @@ -92,7 +90,7 @@ struct ServerState unsigned int Major; unsigned int Minor; unsigned int Result; - char Code[MAXLEN]; + char Code[360]; // These are some statistics from the last parsed header lines unsigned long long Size; diff --git a/methods/https.h b/methods/https.h index b7adeb880..3b57c7be6 100644 --- a/methods/https.h +++ b/methods/https.h @@ -11,8 +11,6 @@ #ifndef APT_HTTP_H #define APT_HTTP_H -#define MAXLEN 360 - #include #include -- cgit v1.2.3