dispose http(s) 416 error page as non-content
[ntk/apt.git] / methods / http.cc
index f2a4a4d..1b996db 100644 (file)
@@ -440,6 +440,8 @@ bool HttpServerState::RunData(FileFd * const File)
          loss of the connection means we are done */
       if (Encoding == Closes)
         In.Limit(-1);
+      else if (JunkSize != 0)
+        In.Limit(JunkSize);
       else
         In.Limit(Size - StartPos);