aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2020-07-18 19:03:39 +0200
committerTeddy Wing2020-07-18 19:03:39 +0200
commite3f4e806cad703def89c7a96c06bda8dfd94990a (patch)
treef4799880430f3f13d9d5795b421b21324ccadd6d
parenta0fdc3ddaee2458212c27c44bd8c10deeb875d99 (diff)
downloadfastcgi-conduit-e3f4e806cad703def89c7a96c06bda8dfd94990a.tar.bz2
server.rs: Remove canonical status name from "Status" header
This seemed to cause the name to be doubled in the final Apache HTTP header. Since it could cause that issue and is not necessary, we can remove it.
-rw-r--r--src/server.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/server.rs b/src/server.rs
index d23ab9d..d9eee95 100644
--- a/src/server.rs
+++ b/src/server.rs
@@ -105,9 +105,8 @@ where H: Handler + 'static + Sync
write!(
&mut stdout,
- "Status: {} {}\r\n",
+ "Status: {}\r\n",
head.status.as_str(),
- head.status.canonical_reason().unwrap_or("UNKNOWN"),
)?;
for (name, value) in head.headers.iter() {
@@ -136,9 +135,8 @@ fn internal_server_error<W: Write>(mut w: W) {
write!(
w,
- "Status: {} {}\r\n{}\r\n\r\n",
+ "Status: {}\r\n{}\r\n\r\n",
code,
- code.canonical_reason().unwrap_or_default(),
"Content-Length: 0",
)
.unwrap_or_else(|e| error!("Write error: {}", e))