]> git.saurik.com Git - apt.git/blobdiff - methods/http.cc
Allow empty Reason-Phase in the Status-Lines, which is allowed by rtf
[apt.git] / methods / http.cc
index 006e89394a5282e7bc7c0125a638030fe41a5627..df62034e36cda48e7df987f03de668d674e13142 100644 (file)
@@ -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"));
       }