[kaffe] CVS kaffe (robilad): resynced with gnu classpath: http fixes
Kaffe CVS
cvs-commits at kaffe.org
Sun May 15 03:23:55 PDT 2005
PatchSet 6481
Date: 2005/05/15 10:16:35
Author: robilad
Branch: HEAD
Tag: (none)
Log:
resynced with gnu classpath: http fixes
2005-05-15 Dalibor Topic <robilad at kaffe.org>
Resynced with GNU Classpath.
2005-04-27 Chris Burdess <dog at gnu.org>
* java/net/protocol/http/HTTPURLConnection.java (connect): Accept
absolute and relative paths in Location header.
Members:
ChangeLog:1.4007->1.4008
libraries/javalib/gnu/java/net/protocol/http/HTTPURLConnection.java:1.7->1.8
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4007 kaffe/ChangeLog:1.4008
--- kaffe/ChangeLog:1.4007 Sun May 15 10:13:23 2005
+++ kaffe/ChangeLog Sun May 15 10:16:35 2005
@@ -2,6 +2,15 @@
Resynced with GNU Classpath.
+ 2005-04-27 Chris Burdess <dog at gnu.org>
+
+ * java/net/protocol/http/HTTPURLConnection.java (connect): Accept
+ absolute and relative paths in Location header.
+
+2005-05-15 Dalibor Topic <robilad at kaffe.org>
+
+ Resynced with GNU Classpath.
+
2005-04-27 Roman Kennke <roman at kennke.org>
* java/awt/MediaTracker.java: Added 2005 to copyright statement.
Index: kaffe/libraries/javalib/gnu/java/net/protocol/http/HTTPURLConnection.java
diff -u kaffe/libraries/javalib/gnu/java/net/protocol/http/HTTPURLConnection.java:1.7 kaffe/libraries/javalib/gnu/java/net/protocol/http/HTTPURLConnection.java:1.8
--- kaffe/libraries/javalib/gnu/java/net/protocol/http/HTTPURLConnection.java:1.7 Sun May 15 09:40:49 2005
+++ kaffe/libraries/javalib/gnu/java/net/protocol/http/HTTPURLConnection.java Sun May 15 10:16:37 2005
@@ -283,7 +283,23 @@
file = location.substring(end);
retry = true;
}
- // Otherwise this is not an HTTP redirect, can't follow
+ else if (location.length() > 0)
+ {
+ // Malformed absolute URI, treat as file part of URI
+ if (location.charAt(0) == '/')
+ {
+ // Absolute path
+ file = location;
+ }
+ else
+ {
+ // Relative path
+ int lsi = file.lastIndexOf('/');
+ file = (lsi == -1) ? "/" : file.substring(0, lsi + 1);
+ file += location;
+ }
+ retry = true;
+ }
}
else
{
More information about the kaffe
mailing list