diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2009-09-23 17:26:43 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2009-09-23 17:26:43 +0200 |
commit | f98233c1b1e93ef1bb595bfc6e59c74d9e05eb6a (patch) | |
tree | 82d6aa3ff7c2c2e6d073ff39f09e52aa7407562d /methods/http.cc | |
parent | a69a3a044be84f72508fb468cdf13d9e5f724dd4 (diff) | |
parent | f7d6459db697c6dbba8e5d787a817e7721bfb577 (diff) |
merged from debian
Diffstat (limited to 'methods/http.cc')
-rw-r--r-- | methods/http.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/methods/http.cc b/methods/http.cc index 7b61973d7..ba0241fc1 100644 --- a/methods/http.cc +++ b/methods/http.cc @@ -552,7 +552,7 @@ bool ServerState::HeaderLine(string Line) // Evil servers return no version if (Line[4] == '/') { - if (sscanf(Line.c_str(),"HTTP/%u.%u %u %[^\n]",&Major,&Minor, + if (sscanf(Line.c_str(),"HTTP/%u.%u %u%[^\n]",&Major,&Minor, &Result,Code) != 4) return _error->Error(_("The HTTP server sent an invalid reply header")); } @@ -560,7 +560,7 @@ bool ServerState::HeaderLine(string Line) { Major = 0; Minor = 9; - if (sscanf(Line.c_str(),"HTTP %u %[^\n]",&Result,Code) != 2) + if (sscanf(Line.c_str(),"HTTP %u%[^\n]",&Result,Code) != 2) return _error->Error(_("The HTTP server sent an invalid reply header")); } |