mirror of
https://github.com/actix/actix-extras.git
synced 2025-06-25 09:59:21 +02:00
do not read head payload
This commit is contained in:
@ -17,6 +17,7 @@ use context::{ActorHttpContext, Frame};
|
||||
use error::Error;
|
||||
use error::PayloadError;
|
||||
use header::ContentEncoding;
|
||||
use http::Method;
|
||||
use httpmessage::HttpMessage;
|
||||
use server::input::PayloadStream;
|
||||
use server::WriterState;
|
||||
@ -212,6 +213,9 @@ impl Future for SendRequest {
|
||||
|
||||
match pl.parse() {
|
||||
Ok(Async::Ready(mut resp)) => {
|
||||
if self.req.method() == &Method::HEAD {
|
||||
pl.parser.take();
|
||||
}
|
||||
resp.set_pipeline(pl);
|
||||
return Ok(Async::Ready(resp));
|
||||
}
|
||||
|
Reference in New Issue
Block a user