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.
This commit is contained in:
Patrick Scott
2009-07-20 15:38:17 -04:00
parent 4f7b7c3cc6
commit c319c69b12
2 changed files with 3 additions and 3 deletions

View File

@@ -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;
}
/**

View File

@@ -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));
}
/**