mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
net: Use the unfiltered response status when comparing against cached resources. (#35483)
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
parent
5ab3641a8e
commit
34c73fb452
3 changed files with 29 additions and 2 deletions
|
@ -625,13 +625,15 @@ impl HttpCache {
|
|||
Some(resources) => resources,
|
||||
};
|
||||
|
||||
let actual_response = response.actual_response();
|
||||
|
||||
// Ensure we only wake-up consumers of relevant resources,
|
||||
// ie we don't want to wake-up 200 awaiting consumers with a 206.
|
||||
let relevant_cached_resources = cached_resources.iter().filter(|resource| {
|
||||
if response.actual_response().is_network_error() {
|
||||
if actual_response.is_network_error() {
|
||||
return *resource.body.lock().unwrap() == ResponseBody::Empty;
|
||||
}
|
||||
resource.status == response.status
|
||||
resource.status == actual_response.status
|
||||
});
|
||||
|
||||
for cached_resource in relevant_cached_resources {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue