[kaffe] Fw: patches to make Jetty-4.2.12 compile
Jim Pick
jim@kaffe.org
Thu Sep 25 11:36:02 2003
This is a multi-part message in MIME format.
--Multipart_Thu__25_Sep_2003_11:32:36_-0700_081753b0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Thanks. I'm going to forward these to the list.
Cheers,
- Jim
Begin forwarded message:
Date: Thu, 25 Sep 2003 16:05:39 +1000
From: Chris Forkin <chris@forkin.com>
To: jim@kaffe.org
Subject: patches to make Jetty-4.2.12 compile
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Jim,
I needed to patch java.net.HttpURLConnection and java.net.URLConnection
to be able to compile Jetty-4.2.12. The patches bring those 2 classes
up2date with JDK 1.4. I'm not sure who to send this stuff to and therefore
sent it to you.
Regards, Chris.
- --
//------------------------------------------------------------//
// Email: chris@forkin.com WWW: http://www.forkin.com/ //
// PGP: http://www.forkin.com/pgpkeys/chris@forkin.com.asc //
// Postal: P.O.Box 106, BEROWRA HEIGHTS, NSW 2082, Australia //
//------------------------------------------------------------//
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (FreeBSD)
iD8DBQE/coW4AOIWT6aArssRAljQAJ40CxgqlfPFJYXJ9kgQFc4dTe/bKQCgkaan
hToosAiI364AfPYvMxpsIHQ=
=zcSL
-----END PGP SIGNATURE-----
--Multipart_Thu__25_Sep_2003_11:32:36_-0700_081753b0
Content-Type: text/x-diff;
name="URLConnection.java.patch"
Content-Disposition: attachment;
filename="URLConnection.java.patch"
Content-Transfer-Encoding: 7bit
*** libraries/javalib/java/net/URLConnection.java.orig Fri Jul 18 22:51:33 2003
--- libraries/javalib/java/net/URLConnection.java Thu Sep 25 15:52:21 2003
***************
*** 247,252 ****
--- 247,263 ----
requestProperties.add( value );
}
+ public void addRequestProperty(String key, String value) {
+ if ( key == null )
+ throw new NullPointerException("key is null");
+
+ int pos = requestProperties.indexOf( key );
+ if (pos < 0) {
+ requestProperties.add( key );
+ requestProperties.add( value );
+ }
+ }
+
public void setUseCaches(boolean usecaches) {
useCaches = usecaches;
}
--Multipart_Thu__25_Sep_2003_11:32:36_-0700_081753b0
Content-Type: text/x-diff;
name="HttpURLConnection.java.patch"
Content-Disposition: attachment;
filename="HttpURLConnection.java.patch"
Content-Transfer-Encoding: 7bit
*** libraries/javalib/java/net/HttpURLConnection.java.orig Fri Jul 18 22:51:33 2003
--- libraries/javalib/java/net/HttpURLConnection.java Thu Sep 25 15:52:21 2003
***************
*** 11,16 ****
--- 11,17 ----
package java.net;
import java.io.IOException;
+ import java.io.InputStream;
abstract public class HttpURLConnection extends URLConnection {
***************
*** 54,59 ****
--- 55,61 ----
public static final int HTTP_VERSION = 505;
static private boolean followRedirects = true;
+ private boolean instanceFollowRedirects = true;
protected String method = "GET";
protected int responseCode;
***************
*** 75,80 ****
--- 77,90 ----
followRedirects = follow;
}
+ public boolean getInstanceFollowRedirects () {
+ return instanceFollowRedirects;
+ }
+
+ public void setInstanceFollowRedirects (boolean follow) {
+ instanceFollowRedirects = follow;
+ }
+
public String getRequestMethod () {
return method;
}
***************
*** 98,103 ****
--- 108,117 ----
throw new ProtocolException("bad request message: " + message);
}
method = message;
+ }
+
+ public InputStream getErrorStream() {
+ return null;
}
public abstract void disconnect ();
--Multipart_Thu__25_Sep_2003_11:32:36_-0700_081753b0--