mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
net: Suppress default ports in Origin header.
This commit is contained in:
parent
bf564cae5d
commit
27c25116d3
2 changed files with 7 additions and 8 deletions
|
@ -1450,13 +1450,8 @@ fn test_origin_set() {
|
|||
);
|
||||
|
||||
let origin_url = ServoUrl::parse("http://example.com").unwrap();
|
||||
// XXX: Not sure about the Some(80) here. origin_url.origin() returns 80 for the port but origin_url returns None.
|
||||
origin = Origin::try_from_parts(
|
||||
origin_url.scheme(),
|
||||
origin_url.host_str().unwrap(),
|
||||
Some(80),
|
||||
)
|
||||
.unwrap();
|
||||
origin =
|
||||
Origin::try_from_parts(origin_url.scheme(), origin_url.host_str().unwrap(), None).unwrap();
|
||||
// Test Origin header is set on Get request with CORS mode
|
||||
let mut request = Request::from_init(RequestInit {
|
||||
url: url.clone(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue