mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +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
|
@ -20,6 +20,7 @@ use bitflags::bitflags;
|
|||
use http::{HeaderMap, Method};
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use malloc_size_of_derive::MallocSizeOf;
|
||||
use net_traits::http_status::HttpStatus;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use servo_url::ServoUrl;
|
||||
use uuid::Uuid;
|
||||
|
@ -350,7 +351,7 @@ pub struct HttpRequest {
|
|||
#[derive(Debug, PartialEq)]
|
||||
pub struct HttpResponse {
|
||||
pub headers: Option<HeaderMap>,
|
||||
pub status: Option<(u16, Vec<u8>)>,
|
||||
pub status: HttpStatus,
|
||||
pub body: Option<Vec<u8>>,
|
||||
pub pipeline_id: PipelineId,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue