fix Get and Head requests that weren't writing headers
This commit is contained in:
@@ -119,6 +119,9 @@ impl Request<Fresh> {
|
|||||||
|
|
||||||
let stream = match self.method {
|
let stream = match self.method {
|
||||||
Get | Head => {
|
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())
|
EmptyWriter(self.body.unwrap())
|
||||||
},
|
},
|
||||||
_ => {
|
_ => {
|
||||||
@@ -152,7 +155,6 @@ impl Request<Fresh> {
|
|||||||
|
|
||||||
debug!("headers [\n{}]", self.headers);
|
debug!("headers [\n{}]", self.headers);
|
||||||
try_io!(write!(self.body, "{}", self.headers));
|
try_io!(write!(self.body, "{}", self.headers));
|
||||||
|
|
||||||
try_io!(self.body.write(LINE_ENDING));
|
try_io!(self.body.write(LINE_ENDING));
|
||||||
|
|
||||||
if chunked {
|
if chunked {
|
||||||
|
|||||||
Reference in New Issue
Block a user