mirror of
https://github.com/servo/servo.git
synced 2025-07-31 19:20:22 +01:00
Do not return an error for non-GET data: requests (fixes #13293)
This commit is contained in:
parent
e0731215c0
commit
c0f9fb8f55
2 changed files with 28 additions and 12 deletions
|
@ -395,7 +395,6 @@ fn basic_fetch(request: &mut Request,
|
||||||
},
|
},
|
||||||
|
|
||||||
"data" => {
|
"data" => {
|
||||||
if request.method == Method::Get {
|
|
||||||
match decode(&url) {
|
match decode(&url) {
|
||||||
Ok((mime, bytes)) => {
|
Ok((mime, bytes)) => {
|
||||||
let mut response = Response::new(url);
|
let mut response = Response::new(url);
|
||||||
|
@ -405,9 +404,6 @@ fn basic_fetch(request: &mut Request,
|
||||||
},
|
},
|
||||||
Err(_) => Response::network_error(NetworkError::Internal("Decoding data URL failed".into()))
|
Err(_) => Response::network_error(NetworkError::Internal("Decoding data URL failed".into()))
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
Response::network_error(NetworkError::Internal("Unexpected method for data".into()))
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
"file" => {
|
"file" => {
|
||||||
|
|
|
@ -3,3 +3,23 @@
|
||||||
[XHR method GET with charset text/html;charset=UTF-8]
|
[XHR method GET with charset text/html;charset=UTF-8]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
[XHR method POST with charset text/plain]
|
||||||
|
bug: https://github.com/w3c/web-platform-tests/issues/3738
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[XHR method PUT with charset text/plain]
|
||||||
|
bug: https://github.com/w3c/web-platform-tests/issues/3738
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[XHR method DELETE with charset text/plain]
|
||||||
|
bug: https://github.com/w3c/web-platform-tests/issues/3738
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[XHR method HEAD with charset text/plain]
|
||||||
|
bug: https://github.com/w3c/web-platform-tests/issues/3738
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[XHR method UNICORN with charset text/plain]
|
||||||
|
bug: https://github.com/w3c/web-platform-tests/issues/3738
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue