1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-06-30 03:44:27 +02:00

Allow to use path without traling slashes for scope registration #241

This commit is contained in:
Nikolay Kim
2018-05-23 13:21:29 -07:00
parent 72757887c9
commit 68eb2f26c9
11 changed files with 107 additions and 59 deletions

View File

@ -506,7 +506,7 @@ impl ContentEncoder {
TransferEncoding::eof(buf)
} else {
if !(encoding == ContentEncoding::Identity
|| encoding == ContentEncoding::Auto)
|| encoding == ContentEncoding::Auto)
{
resp.headers_mut().remove(CONTENT_LENGTH);
}

View File

@ -273,7 +273,7 @@ where
Ok(Async::Ready(_)) => {
// non consumed payload in that case close connection
if self.payload.is_some() && self.tasks.is_empty() {
return Ok(Async::Ready(false))
return Ok(Async::Ready(false));
}
}
}

View File

@ -1,6 +1,6 @@
#![cfg_attr(feature = "cargo-clippy", allow(redundant_field_names))]
use bytes::{BytesMut, BufMut};
use bytes::{BufMut, BytesMut};
use futures::{Async, Poll};
use std::io;
use std::rc::Rc;

View File

@ -136,7 +136,7 @@ impl HttpHandler for Box<HttpHandler> {
#[doc(hidden)]
pub trait HttpHandlerTask {
/// Poll task, this method is used before or after *io* object is available
fn poll(&mut self) -> Poll<(), Error>{
fn poll(&mut self) -> Poll<(), Error> {
Ok(Async::Ready(()))
}