summaryrefslogtreecommitdiff
path: root/methods
diff options
context:
space:
mode:
Diffstat (limited to 'methods')
-rw-r--r--methods/http.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/methods/http.cc b/methods/http.cc
index 006e89394..df62034e3 100644
--- a/methods/http.cc
+++ b/methods/http.cc
@@ -547,7 +547,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"));
}
@@ -555,7 +555,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"));
}