mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
handle caching of response with a body of ResponseBody::Receiving
This commit is contained in:
parent
609e975c50
commit
993e2f55ed
5 changed files with 80 additions and 43 deletions
|
@ -408,6 +408,12 @@ pub fn main_fetch(request: &mut Request,
|
|||
// Step 24.
|
||||
target.process_response_eof(&response);
|
||||
|
||||
if !response.is_network_error() {
|
||||
if let Ok(mut http_cache) = context.state.http_cache.write() {
|
||||
http_cache.update_awaiting_consumers(&request, &response);
|
||||
}
|
||||
}
|
||||
|
||||
// Steps 25-27.
|
||||
// TODO: remove this line when only asynchronous fetches are used
|
||||
response
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue