[kaffe] CVS kaffe (robilad): Resynced with GNU Classpath: fixes for HTTPURLConnection

Kaffe CVS cvs-commits at kaffe.org
Wed Dec 8 09:21:57 PST 2004


PatchSet 5566 
Date: 2004/12/08 17:17:46
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
Resynced with GNU Classpath: fixes for HTTPURLConnection

2004-12-08  Dalibor Topic  <robilad at kaffe.org>

* libraries/javalib/gnu/java/net/LineInputStream.java,
libraries/javalib/gnu/java/net/protocol/http/HTTPURLConnection.java:
Resynced with GNU Classpath.

2004-12-06  Chris Burdess  <dog at gnu.org>

* gnu/java/net/LineInputStream.java: (read) fixed possible infinite
loop (inetlib bug #11200).

2004-12-06  Chris Burdess  <dog at gnu.org>

* gnu/java/net/protocol/http/HTTPURLConnection.java:
(getHeaderField) return null if there are less than (index+1)

Members: 
	ChangeLog:1.3112->1.3113 
	libraries/javalib/gnu/java/net/LineInputStream.java:1.1->1.2 
	libraries/javalib/gnu/java/net/protocol/http/HTTPURLConnection.java:1.3->1.4 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3112 kaffe/ChangeLog:1.3113
--- kaffe/ChangeLog:1.3112	Wed Dec  8 16:51:52 2004
+++ kaffe/ChangeLog	Wed Dec  8 17:17:46 2004
@@ -1,5 +1,22 @@
 2004-12-08  Dalibor Topic  <robilad at kaffe.org>
 
+	* libraries/javalib/gnu/java/net/LineInputStream.java,
+	libraries/javalib/gnu/java/net/protocol/http/HTTPURLConnection.java:
+	Resynced with GNU Classpath.
+	
+	2004-12-06  Chris Burdess  <dog at gnu.org>
+
+	* gnu/java/net/LineInputStream.java: (read) fixed possible infinite
+	loop (inetlib bug #11200).
+
+	2004-12-06  Chris Burdess  <dog at gnu.org>
+
+	* gnu/java/net/protocol/http/HTTPURLConnection.java:
+	(getHeaderField) return null if there are less than (index+1)
+	fields.
+	
+2004-12-08  Dalibor Topic  <robilad at kaffe.org>
+
 	* libraries/javalib/java/io/ObjectInputStream.java:
 	Resynced with GNU Classpath.
 	
Index: kaffe/libraries/javalib/gnu/java/net/LineInputStream.java
diff -u kaffe/libraries/javalib/gnu/java/net/LineInputStream.java:1.1 kaffe/libraries/javalib/gnu/java/net/LineInputStream.java:1.2
--- kaffe/libraries/javalib/gnu/java/net/LineInputStream.java:1.1	Fri Dec  3 17:44:36 2004
+++ kaffe/libraries/javalib/gnu/java/net/LineInputStream.java	Wed Dec  8 17:17:49 2004
@@ -144,7 +144,7 @@
                 while (pos > 0)
                   {
                     len = in.read(b, 0, pos);
-                    pos -= len;
+                    pos = (len == -1) ? -1 : pos - len;
                   }
                 // Return line
                 String ret = buf.toString(encoding);
Index: kaffe/libraries/javalib/gnu/java/net/protocol/http/HTTPURLConnection.java
diff -u kaffe/libraries/javalib/gnu/java/net/protocol/http/HTTPURLConnection.java:1.3 kaffe/libraries/javalib/gnu/java/net/protocol/http/HTTPURLConnection.java:1.4
--- kaffe/libraries/javalib/gnu/java/net/protocol/http/HTTPURLConnection.java:1.3	Mon Dec  6 18:30:11 2004
+++ kaffe/libraries/javalib/gnu/java/net/protocol/http/HTTPURLConnection.java	Wed Dec  8 17:17:49 2004
@@ -450,6 +450,10 @@
     int count = 1;
     do
       {
+        if (!i.hasNext())
+          {
+            return null;
+          }
         entry = (Map.Entry) i.next();
         count++;
       }




More information about the kaffe mailing list