diff options
author | Teddy Wing | 2020-06-28 19:54:01 +0200 |
---|---|---|
committer | Teddy Wing | 2020-06-28 19:54:01 +0200 |
commit | 8ac4bfa0c941acefedf0d384685e8b422fc4b426 (patch) | |
tree | df7b4b615a9efd095c4b2bb7e4d1ce1340ebbc97 /src | |
parent | a613320c5f69089feba14ef36de58bdc21dd7e0b (diff) | |
download | fastcgi-conduit-8ac4bfa0c941acefedf0d384685e8b422fc4b426.tar.bz2 |
Server::start(): Write HTTP version and status code
Diffstat (limited to 'src')
-rw-r--r-- | src/lib.rs | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -253,6 +253,13 @@ impl Server { let (head, body) = response.unwrap().into_parts(); + write!( + &mut stdout, + "HTTP/1.1 {} {}\r\n", + head.status.as_str(), + head.status.canonical_reason().unwrap_or("UNKNOWN"), + ); + for (name, value) in head.headers.iter() { write!(&mut stdout, "{}: ", name).unwrap(); stdout.write(value.as_bytes()).unwrap(); |