1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-18 11:55:36 +02:00

Compare commits

..

4 Commits

Author SHA1 Message Date
Nikolay Kim
3378247bee prepare release 2018-07-11 13:27:50 +06:00
Nikolay Kim
7507412a1d fix h2 compatibility 2018-07-11 13:26:51 +06:00
Nikolay Kim
6b9a193aa8 update changelog 2018-07-11 13:26:40 +06:00
Gary Hai
c2979760b5 Fix duplicate tail of StaticFiles with index_file. (#344) 2018-06-25 19:37:24 +03:00
4 changed files with 15 additions and 9 deletions

View File

@@ -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

View File

@@ -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"

View File

@@ -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();

View File

@@ -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,