diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2009-12-02 17:24:56 +0100 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2009-12-02 17:24:56 +0100 |
commit | f3ceaca7a648f7d93fa88106910151e69f498801 (patch) | |
tree | b2bf899c035363fbc0b561f1006a787cb06527f0 /methods/http.cc | |
parent | 5085e660679cdbb51783702898c42000d5db4fba (diff) | |
parent | 16d7341fce96b089aa2a1c241acd0a72209bcd7f (diff) |
merge from the debian-sid branch
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 1eba0f279..461a98406 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")); } |