mirror of
https://github.com/actix/actix-web.git
synced 2025-01-01 12:58:46 +00:00
fix reading from socket
This commit is contained in:
parent
9c1bda3eca
commit
91235ac816
2 changed files with 2 additions and 2 deletions
|
@ -573,7 +573,7 @@ impl<S: 'static> Handler<S> for StaticFiles<S> {
|
|||
} else {
|
||||
let relpath = match req.match_info()
|
||||
.get("tail")
|
||||
.map(|tail| PathBuf::from_param(tail))
|
||||
.map(|tail| PathBuf::from_param(tail.trim_left_matches('/')))
|
||||
{
|
||||
Some(Ok(path)) => path,
|
||||
_ => return Ok(self.default.handle(req)),
|
||||
|
|
|
@ -388,7 +388,7 @@ where
|
|||
}
|
||||
}
|
||||
Err(e) => {
|
||||
return e.kind() == io::ErrorKind::WouldBlock;
|
||||
return e.kind() != io::ErrorKind::WouldBlock;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue