diff options
author | Naveen Gattu <naveen.gattu@gmail.com> | 2021-12-17 10:09:22 -0800 |
---|---|---|
committer | Naveen Gattu <naveen.gattu@gmail.com> | 2021-12-17 11:25:59 -0800 |
commit | a744ac26dae5c6de52569da1af3875943f7f98af (patch) | |
tree | 3dcea93a3265c9e4b482a50611afb2134e404e10 /python/mach/setup.py | |
parent | 8650794391729c6fee34bc2644ccbb85bd8fd58d (diff) | |
download | servo-a744ac26dae5c6de52569da1af3875943f7f98af.tar.gz servo-a744ac26dae5c6de52569da1af3875943f7f98af.zip |
concept-response-clone: Ensure header guard is cloned after headers
https://fetch.spec.whatwg.org/#concept-response-clone
If the header guard of the response to clone is `immutable`, then copying the headers to the new response will fail with `Guard is immutable` unless we ensure the guard is copied _after_ the headers.
https://github.com/servo/servo/blob/8650794391729c6fee34bc2644ccbb85bd8fd58d/components/script/dom/response.rs#L331-L334
fn Append(&self, name: ByteString, value: ByteString) -> ErrorResult {
// Step 1
let value = normalize_value(value);
// Step 2
let (mut valid_name, valid_value) = validate_name_and_value(name, value)?;
valid_name = valid_name.to_lowercase();
// Step 3
if self.guard.get() == Guard::Immutable {
return Err(Error::Type("Guard is immutable".to_string()));
}
Diffstat (limited to 'python/mach/setup.py')
0 files changed, 0 insertions, 0 deletions