summaryrefslogtreecommitdiff
path: root/methods/http.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2009-08-27 14:16:07 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2009-08-27 14:16:07 +0200
commitfe58cbc86638e214fa137166a704fbff798c546a (patch)
treefcd445921d800462a2dab16db2951024440d4956 /methods/http.cc
parentf30eb61fde728f125bf7c673cadc17f43d82a2d0 (diff)
parent8c75bf9e9558d062a5f3d1fe5276aeffba6403a0 (diff)
merged from lp:~donkult/apt/sid
Diffstat (limited to 'methods/http.cc')
-rw-r--r--methods/http.cc4
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"));
}