|
|
@ -89,10 +89,9 @@ pub fn create_response(request: &Request) -> Result<Response> { |
|
|
|
fn write_response<T>(w: &mut dyn io::Write, response: &HttpResponse<T>) -> Result<()> { |
|
|
|
fn write_response<T>(w: &mut dyn io::Write, response: &HttpResponse<T>) -> Result<()> { |
|
|
|
writeln!( |
|
|
|
writeln!( |
|
|
|
w, |
|
|
|
w, |
|
|
|
"{version:?} {status} {reason}\r", |
|
|
|
"{version:?} {status}\r", |
|
|
|
version = response.version(), |
|
|
|
version = response.version(), |
|
|
|
status = response.status(), |
|
|
|
status = response.status() |
|
|
|
reason = response.status().canonical_reason().unwrap_or(""), |
|
|
|
|
|
|
|
)?; |
|
|
|
)?; |
|
|
|
|
|
|
|
|
|
|
|
for (k, v) in response.headers() { |
|
|
|
for (k, v) in response.headers() { |
|
|
|