From: megacz Date: Fri, 30 Jan 2004 06:49:05 +0000 (+0000) Subject: 2002/07/16 01:27:48 X-Git-Tag: RC3~1627 X-Git-Url: http://git.megacz.com/?p=org.ibex.core.git;a=commitdiff_plain;h=a12f0c16ce777aba8fac15ae75e1dbc85c2bb94f 2002/07/16 01:27:48 darcs-hash:20040130064905-2ba56-dad797fe69a9e90b2fa4c553e97d2180351acb2d.gz --- diff --git a/src/org/xwt/HTTP.java b/src/org/xwt/HTTP.java index 64cfdba..a596af4 100644 --- a/src/org/xwt/HTTP.java +++ b/src/org/xwt/HTTP.java @@ -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; }