Auto merge of #10502 - KiChjang:fix-open-url-base, r=Ms2ger

Add API base url method to global objects

This adds an `api_base_url` function to global objects, which fixes `open-url-base.htm` under XMLHttpRequest.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10502)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-04-11 17:57:02 +05:30
commit 07304235cc
4 changed files with 12 additions and 11 deletions

View file

@ -350,7 +350,7 @@ impl XMLHttpRequestMethods for XMLHttpRequest {
}
// Step 2
let base = self.global().r().get_url();
let base = self.global().r().api_base_url();
// Step 6
let mut parsed_url = match base.join(&url.0) {
Ok(parsed) => parsed,