Set response status for range requests to file and blob urls

This commit is contained in:
Fernando Jiménez Moreno 2018-11-15 06:45:13 +01:00
parent b96e5681aa
commit 79d27cb7ca
5 changed files with 96 additions and 37 deletions

View file

@ -27246,7 +27246,7 @@
"testharness"
],
"mozilla/range_request_blob_url.html": [
"b41f0b5382e3994db35f38b2c358a41b75551fe2",
"075397620e989dafc814c0ed2bca46bd476bccf6",
"testharness"
],
"mozilla/range_request_file_url.html": [

View file

@ -23,12 +23,10 @@
range: "bytes=0-100",
status: 206,
expected: "abcdefghijklmnopqrstuvwxyz"
/*}, {
XXX(ferjm): Range requests with an out of bounds start throw an exception
rather than responding with 416.
}, {
range: "bytes=100-",
status: 416,
expected: ""*/
expected: ""
}, {
range: "bytes=-100",
status: 206,
@ -43,11 +41,10 @@
}
})
.then(response => {
// XXX(ferjm): Responses to range requests to blob urls have status 200 rather than 206.
// assert_equals(response.status, test.status);
// if (response.status != 206) {
// return "";
// }
assert_equals(response.status, test.status);
if (response.status != 206) {
return "";
}
return response.text();
})
.then(response => {