[kaffe] CVS kaffe (robilad): Resynced with gnu classpath: http fix

Kaffe CVS cvs-commits at kaffe.org
Sun May 15 02:51:27 PDT 2005


PatchSet 6475 
Date: 2005/05/15 09:40:45
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
Resynced with gnu classpath: http fix

2005-05-15  Dalibor Topic  <robilad at kaffe.org>

        Resynced with GNU Classpath.

        2005-04-26  Chris Burdess  <dog at gnu.org>

        * gnu/java/net/protocol/http/HTTPURLConnection.java: Throw
        FileNotFoundException and implement getErrorStream on 404.

Members: 
	ChangeLog:1.4002->1.4003 
	libraries/javalib/gnu/java/net/protocol/http/HTTPURLConnection.java:1.6->1.7 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4002 kaffe/ChangeLog:1.4003
--- kaffe/ChangeLog:1.4002	Sun May 15 09:36:54 2005
+++ kaffe/ChangeLog	Sun May 15 09:40:45 2005
@@ -2,6 +2,15 @@
 
 	Resynced with GNU Classpath.
 
+	2005-04-26  Chris Burdess  <dog at gnu.org>
+
+        * gnu/java/net/protocol/http/HTTPURLConnection.java: Throw
+        FileNotFoundException and implement getErrorStream on 404.
+
+2005-05-15  Dalibor Topic  <robilad at kaffe.org>
+
+	Resynced with GNU Classpath.
+
 	2005-04-26  Roman Kennke  <roman at kennke.org>
 
         * javax/swing/plaf/basic/BasicToggleButtonUI.java:
Index: kaffe/libraries/javalib/gnu/java/net/protocol/http/HTTPURLConnection.java
diff -u kaffe/libraries/javalib/gnu/java/net/protocol/http/HTTPURLConnection.java:1.6 kaffe/libraries/javalib/gnu/java/net/protocol/http/HTTPURLConnection.java:1.7
--- kaffe/libraries/javalib/gnu/java/net/protocol/http/HTTPURLConnection.java:1.6	Tue Mar  8 21:03:51 2005
+++ kaffe/libraries/javalib/gnu/java/net/protocol/http/HTTPURLConnection.java	Sun May 15 09:40:49 2005
@@ -40,6 +40,7 @@
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
+import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
@@ -94,6 +95,7 @@
 
   private Response response;
   private ByteArrayInputStream responseSink;
+  private ByteArrayInputStream errorSink;
 
   private HandshakeCompletedEvent handshakeEvent;
 
@@ -286,6 +288,11 @@
         else
           {
             responseSink = new ByteArrayInputStream(reader.toByteArray ());
+            if (response.getCode() == 404)
+              {
+                errorSink = responseSink;
+                throw new FileNotFoundException(url.toString());
+              }
           }
       }
     while (retry);
@@ -453,6 +460,11 @@
         throw new ProtocolException("doInput is false");
       }
     return responseSink;
+  }
+
+  public InputStream getErrorStream()
+  {
+    return errorSink;
   }
 
   public Map getHeaderFields()




More information about the kaffe mailing list