mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Auto merge of #24356 - servo:jdm-patch-30, r=paulrouget
Use unfiltered response body when replicating body of cached responses. The amount of time it took me to track this down makes me wonder if there would be a better way of representing response bodies and filtered responses. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #24350 - [ ] There are tests for these changes <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24356) <!-- Reviewable:end -->
This commit is contained in:
commit
bbc94d256c
1 changed files with 3 additions and 1 deletions
|
@ -669,7 +669,9 @@ impl HttpCache {
|
|||
|
||||
/// Updating consumers who received a response constructed with a ResponseBody::Receiving.
|
||||
pub fn update_awaiting_consumers(&mut self, request: &Request, response: &Response) {
|
||||
if let ResponseBody::Done(ref completed_body) = *response.body.lock().unwrap() {
|
||||
if let ResponseBody::Done(ref completed_body) =
|
||||
*response.actual_response().body.lock().unwrap()
|
||||
{
|
||||
let entry_key = CacheKey::new(request.clone());
|
||||
if let Some(cached_resources) = self.entries.get(&entry_key) {
|
||||
// Ensure we only wake-up consumers of relevant resources,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue