From 9830b66a095175ffb0379802121dda8e9847ed4b Mon Sep 17 00:00:00 2001 From: moricho Date: Wed, 22 Apr 2020 20:49:15 +0900 Subject: [PATCH] dumbo: remove dumbo's dependency on mmds This moves dumbo::ns to mmds crate and implements response retrieval callback passed to dumbo's tcp::handler Signed-off-by: moricho Signed-off-by: YUAN LYU --- src/response.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/response.rs b/src/response.rs index 433bc65..019f176 100644 --- a/src/response.rs +++ b/src/response.rs @@ -51,6 +51,7 @@ impl StatusCode { } } +#[derive(Debug, PartialEq)] struct StatusLine { http_version: Version, status_code: StatusCode, @@ -77,6 +78,7 @@ impl StatusLine { /// Wrapper over the list of headers associated with a HTTP Response. /// When creating a ResponseHeaders object, the content type is initialized to `text/plain`. /// The content type can be updated with a call to `set_content_type`. +#[derive(Debug, PartialEq)] pub struct ResponseHeaders { content_length: i32, content_type: MediaType, @@ -164,6 +166,7 @@ impl ResponseHeaders { /// the body is initialized to `None` and the header is initialized with the `default` value. The body /// can be updated with a call to `set_body`. The header can be updated with `set_content_type` and /// `set_server`. +#[derive(Debug, PartialEq)] pub struct Response { status_line: StatusLine, headers: ResponseHeaders,