Commit 3e0cb4ff by Mark Wielaard Committed by Mark Wielaard

HttpURLConnection.java (HTTP_NOT_IMPLEMENTED): Must be public.

	* java/net/HttpURLConnection.java (HTTP_NOT_IMPLEMENTED): Must be
	public.
	(HTTP_USE_PROXY): Add field.
	(getResponseVals): Only set responseCode when not yet explicitly
	set by subclass.

From-SVN: r60809
parent e55393db
2003-01-02 Mark Wielaard <mark@klomp.org>
* java/net/HttpURLConnection.java (HTTP_NOT_IMPLEMENTED): Must be
public.
(HTTP_USE_PROXY): Add field.
(getResponseVals): Only set responseCode when not yet explicitly
set by subclass.
2003-01-02 Artur Biesiadowski <abies@pg.gda.pl> 2003-01-02 Artur Biesiadowski <abies@pg.gda.pl>
Mark Wielaard <mark@klomp.org> Mark Wielaard <mark@klomp.org>
......
...@@ -143,6 +143,11 @@ public abstract class HttpURLConnection extends URLConnection ...@@ -143,6 +143,11 @@ public abstract class HttpURLConnection extends URLConnection
*/ */
public static final int HTTP_NOT_MODIFIED = 304; public static final int HTTP_NOT_MODIFIED = 304;
/**
* The requested resource needs to be accessed through a proxy.
*/
public static final int HTTP_USE_PROXY = 305;
/* HTTP Client Error Response Codes */ /* HTTP Client Error Response Codes */
...@@ -250,7 +255,7 @@ public abstract class HttpURLConnection extends URLConnection ...@@ -250,7 +255,7 @@ public abstract class HttpURLConnection extends URLConnection
* The server does not support the requested functionality. * The server does not support the requested functionality.
* @since 1.3 * @since 1.3
*/ */
static final int HTTP_NOT_IMPLEMENTED = 501; public static final int HTTP_NOT_IMPLEMENTED = 501;
/** /**
* The proxy encountered a bad response from the server it was proxy-ing for * The proxy encountered a bad response from the server it was proxy-ing for
...@@ -459,6 +464,10 @@ public abstract class HttpURLConnection extends URLConnection ...@@ -459,6 +464,10 @@ public abstract class HttpURLConnection extends URLConnection
connect(); connect();
gotResponseVals = true; gotResponseVals = true;
// If responseCode not yet explicitly set by subclass
if (responseCode == -1)
{
// Response is the first header received from the connection. // Response is the first header received from the connection.
String respField = getHeaderField(0); String respField = getHeaderField(0);
...@@ -486,6 +495,7 @@ public abstract class HttpURLConnection extends URLConnection ...@@ -486,6 +495,7 @@ public abstract class HttpURLConnection extends URLConnection
responseMessage = null; responseMessage = null;
} }
} }
}
/** /**
* Returns a permission object representing the permission necessary to make * Returns a permission object representing the permission necessary to make
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment