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:
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user