mirror of
https://github.com/servo/servo.git
synced 2025-08-12 17:05:33 +01:00
Create HttpStatus to safely deal with HTTP responses status. (#33581)
Signed-off-by: webbeef <me@webbeef.org>
This commit is contained in:
parent
013473f1d5
commit
58f34ad7a3
30 changed files with 344 additions and 403 deletions
|
@ -39,7 +39,7 @@ fn test_refreshing_resource_sets_done_chan_the_appropriate_value() {
|
|||
// First, store the 'normal' response.
|
||||
cache.store(&request, &response);
|
||||
// Second, mutate the response into a 304 response, and refresh the stored one.
|
||||
response.status = Some((StatusCode::NOT_MODIFIED, String::from("304")));
|
||||
response.status = StatusCode::NOT_MODIFIED.into();
|
||||
let (send, recv) = unbounded();
|
||||
let mut done_chan = Some((send, recv));
|
||||
let refreshed_response = cache.refresh(&request, response.clone(), &mut done_chan);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue