diff options
author | Patrick Scott <phanna@android.com> | 2009-07-20 15:38:17 -0400 |
---|---|---|
committer | Patrick Scott <phanna@android.com> | 2009-07-21 07:55:50 -0400 |
commit | c319c69b1228f5eee2f9d71a71ad021f3d8ba82b (patch) | |
tree | 6d4485d90ad8a53b0633c17ed19e6c988bd5dc6f | |
parent | 4f7b7c3cc60087d722591cbee5078552f4aa7a5a (diff) | |
download | frameworks_base-c319c69b1228f5eee2f9d71a71ad021f3d8ba82b.zip frameworks_base-c319c69b1228f5eee2f9d71a71ad021f3d8ba82b.tar.gz frameworks_base-c319c69b1228f5eee2f9d71a71ad021f3d8ba82b.tar.bz2 |
Allow 205 and 305 to have content.
205 is interpreted by Safari to be like 200 and show the given content. Change
canHaveResponseBody to allow 205 to have a body.
305 is a very rare server response indicating to the client to use the given
Location header as a proxy and reissue the original request. Curl doesn't do
anything with this header and neither does internal networking code. For now,
we will just allow the response body to propagate to webcore.
-rw-r--r-- | core/java/android/net/http/Request.java | 3 | ||||
-rw-r--r-- | core/java/android/webkit/LoadListener.java | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/core/java/android/net/http/Request.java b/core/java/android/net/http/Request.java index e160ab6..1b6568e 100644 --- a/core/java/android/net/http/Request.java +++ b/core/java/android/net/http/Request.java @@ -417,8 +417,7 @@ class Request { } return status >= HttpStatus.SC_OK && status != HttpStatus.SC_NO_CONTENT - && status != HttpStatus.SC_NOT_MODIFIED - && status != HttpStatus.SC_RESET_CONTENT; + && status != HttpStatus.SC_NOT_MODIFIED; } /** diff --git a/core/java/android/webkit/LoadListener.java b/core/java/android/webkit/LoadListener.java index c0b6dab..4fe4036 100644 --- a/core/java/android/webkit/LoadListener.java +++ b/core/java/android/webkit/LoadListener.java @@ -1370,7 +1370,8 @@ class LoadListener extends Handler implements EventHandler { */ private boolean ignoreCallbacks() { return (mCancelled || mAuthHeader != null || - (mStatusCode > 300 && mStatusCode < 400)); + // Allow 305 (Use Proxy) to call through. + (mStatusCode > 300 && mStatusCode < 400 && mStatusCode != 305)); } /** |