2002/07/16 01:27:48
authormegacz <megacz@xwt.org>
Fri, 30 Jan 2004 06:49:05 +0000 (06:49 +0000)
committermegacz <megacz@xwt.org>
Fri, 30 Jan 2004 06:49:05 +0000 (06:49 +0000)
darcs-hash:20040130064905-2ba56-dad797fe69a9e90b2fa4c553e97d2180351acb2d.gz

src/org/xwt/HTTP.java

index 64cfdba..a596af4 100644 (file)
@@ -318,10 +318,9 @@ public class HTTP {
         if (!s.startsWith("HTTP/")) throw new HTTPException("Expected reply to start with \"HTTP/\"");
         String reply = s.substring(s.indexOf(' ') + 1);
         if (!reply.startsWith("2")) throw new HTTPException("HTTP Error: " + reply);
-        while((s = headerReader.readLine()) != null) {
-            if (s.length() > 15 && s.substring(0, 15).equalsIgnoreCase("content-length: "))
-                contentLength = Integer.parseInt(s.substring(15));
-        }
+        while((s = headerReader.readLine()) != null)
+            if (s.length() > 15 && s.substring(0, 16).equalsIgnoreCase("content-length: "))
+                contentLength = Integer.parseInt(s.substring(16));
 
         return in;
     }