mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Use the API base URL in Fetch APIs.
This commit is contained in:
parent
fbed4d23d6
commit
75be03041c
4 changed files with 2 additions and 14 deletions
|
@ -92,8 +92,7 @@ impl Request {
|
||||||
let mut fallback_credentials: Option<NetTraitsRequestCredentials> = None;
|
let mut fallback_credentials: Option<NetTraitsRequestCredentials> = None;
|
||||||
|
|
||||||
// Step 4
|
// Step 4
|
||||||
// TODO: `entry settings object` is not implemented in Servo yet.
|
let base_url = global.api_base_url();
|
||||||
let base_url = global.get_url();
|
|
||||||
|
|
||||||
match input {
|
match input {
|
||||||
// Step 5
|
// Step 5
|
||||||
|
|
|
@ -149,8 +149,7 @@ impl Response {
|
||||||
// https://fetch.spec.whatwg.org/#dom-response-redirect
|
// https://fetch.spec.whatwg.org/#dom-response-redirect
|
||||||
pub fn Redirect(global: &GlobalScope, url: USVString, status: u16) -> Fallible<Root<Response>> {
|
pub fn Redirect(global: &GlobalScope, url: USVString, status: u16) -> Fallible<Root<Response>> {
|
||||||
// Step 1
|
// Step 1
|
||||||
// TODO: `entry settings object` is not implemented in Servo yet.
|
let base_url = global.api_base_url();
|
||||||
let base_url = global.get_url();
|
|
||||||
let parsed_url = base_url.join(&url.0);
|
let parsed_url = base_url.join(&url.0);
|
||||||
|
|
||||||
// Step 2
|
// Step 2
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[url-parsing.html]
|
|
||||||
type: testharness
|
|
||||||
[should parse the URL relative to the current settings object]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[url-parsing.html]
|
|
||||||
type: testharness
|
|
||||||
[should parse the redirect Location URL relative to the current settings object]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue