fix Get and Head requests that weren't writing headers

This commit is contained in:
Sean McArthur
2014-11-10 16:10:37 -08:00
parent 619c896801
commit 358edc0d2b

View File

@@ -119,6 +119,9 @@ impl Request<Fresh> {
let stream = match self.method {
Get | Head => {
debug!("headers [\n{}]", self.headers);
try_io!(write!(self.body, "{}", self.headers));
try_io!(self.body.write(LINE_ENDING));
EmptyWriter(self.body.unwrap())
},
_ => {
@@ -152,7 +155,6 @@ impl Request<Fresh> {
debug!("headers [\n{}]", self.headers);
try_io!(write!(self.body, "{}", self.headers));
try_io!(self.body.write(LINE_ENDING));
if chunked {