mirror of
https://github.com/fafhrd91/actix-web
synced 2025-08-18 11:55:36 +02:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
3378247bee | ||
|
7507412a1d | ||
|
6b9a193aa8 | ||
|
c2979760b5 |
@@ -1,5 +1,14 @@
|
||||
# Changes
|
||||
|
||||
## [0.6.15] - 2018-07-11
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fix h2 compatibility #352
|
||||
|
||||
* Fix duplicate tail of StaticFiles with index_file. #344
|
||||
|
||||
|
||||
## [0.6.14] - 2018-06-21
|
||||
|
||||
### Added
|
||||
|
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "actix-web"
|
||||
version = "0.6.14"
|
||||
version = "0.6.15"
|
||||
authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
|
||||
description = "Actix web is a simple, pragmatic and extremely fast web framework for Rust."
|
||||
readme = "README.md"
|
||||
|
11
src/fs.rs
11
src/fs.rs
@@ -653,10 +653,6 @@ impl<S: 'static> Handler<S> for StaticFiles<S> {
|
||||
// TODO: It'd be nice if there were a good usable URL manipulation
|
||||
// library
|
||||
let mut new_path: String = req.path().to_owned();
|
||||
for el in relpath.iter() {
|
||||
new_path.push_str(&el.to_string_lossy());
|
||||
new_path.push('/');
|
||||
}
|
||||
if !new_path.ends_with('/') {
|
||||
new_path.push('/');
|
||||
}
|
||||
@@ -1017,7 +1013,8 @@ mod tests {
|
||||
#[test]
|
||||
fn test_redirect_to_index() {
|
||||
let mut st = StaticFiles::new(".").index_file("index.html");
|
||||
let mut req = HttpRequest::default();
|
||||
let mut req = TestRequest::default().uri("/tests").finish();
|
||||
|
||||
req.match_info_mut().add("tail", "tests");
|
||||
|
||||
let resp = st.handle(req).respond_to(&HttpRequest::default()).unwrap();
|
||||
@@ -1028,7 +1025,7 @@ mod tests {
|
||||
"/tests/index.html"
|
||||
);
|
||||
|
||||
let mut req = HttpRequest::default();
|
||||
let mut req = TestRequest::default().uri("/tests/").finish();
|
||||
req.match_info_mut().add("tail", "tests/");
|
||||
|
||||
let resp = st.handle(req).respond_to(&HttpRequest::default()).unwrap();
|
||||
@@ -1043,7 +1040,7 @@ mod tests {
|
||||
#[test]
|
||||
fn test_redirect_to_index_nested() {
|
||||
let mut st = StaticFiles::new(".").index_file("Cargo.toml");
|
||||
let mut req = HttpRequest::default();
|
||||
let mut req = TestRequest::default().uri("/tools/wsload").finish();
|
||||
req.match_info_mut().add("tail", "tools/wsload");
|
||||
|
||||
let resp = st.handle(req).respond_to(&HttpRequest::default()).unwrap();
|
||||
|
@@ -67,7 +67,7 @@ where
|
||||
flags: Flags::empty(),
|
||||
tasks: VecDeque::new(),
|
||||
state: State::Handshake(server::handshake(IoWrapper {
|
||||
unread: Some(buf),
|
||||
unread: if buf.is_empty() { None } else { Some(buf) },
|
||||
inner: io,
|
||||
})),
|
||||
keepalive_timer: None,
|
||||
|
Reference in New Issue
Block a user