mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Kill Request::omit_origin_header
This commit is contained in:
parent
10801caefd
commit
9394469ede
3 changed files with 6 additions and 14 deletions
|
@ -824,14 +824,11 @@ fn http_network_or_cache_fetch(request: &mut Request,
|
|||
};
|
||||
|
||||
// Step 11
|
||||
if !http_request.omit_origin_header {
|
||||
let method = &http_request.method;
|
||||
if cors_flag || (*method != Method::Get && *method != Method::Head) {
|
||||
debug_assert!(http_request.origin != Origin::Client);
|
||||
if let Origin::Origin(ref url_origin) = http_request.origin {
|
||||
if let Some(hyper_origin) = try_immutable_origin_to_hyper_origin(url_origin) {
|
||||
http_request.headers.set(hyper_origin)
|
||||
}
|
||||
if cors_flag || (http_request.method != Method::Get && http_request.method != Method::Head) {
|
||||
debug_assert!(http_request.origin != Origin::Client);
|
||||
if let Origin::Origin(ref url_origin) = http_request.origin {
|
||||
if let Some(hyper_origin) = try_immutable_origin_to_hyper_origin(url_origin) {
|
||||
http_request.headers.set(hyper_origin)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue