diff --git a/.travis.yml b/.travis.yml
index 00f64d246..b1b0769e1 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -11,9 +11,9 @@ matrix:
- rust: 1.31.0
- rust: stable
- rust: beta
- - rust: nightly-2019-03-02
+ - rust: nightly-2019-04-02
allow_failures:
- - rust: nightly-2019-03-02
+ - rust: nightly-2019-04-02
env:
global:
@@ -26,7 +26,7 @@ before_install:
- sudo apt-get install -y openssl libssl-dev libelf-dev libdw-dev cmake gcc binutils-dev libiberty-dev
before_cache: |
- if [[ "$TRAVIS_RUST_VERSION" == "nightly-2019-03-02" ]]; then
+ if [[ "$TRAVIS_RUST_VERSION" == "nightly-2019-04-02" ]]; then
RUSTFLAGS="--cfg procmacro2_semver_exempt" cargo install cargo-tarpaulin
fi
@@ -50,7 +50,7 @@ after_success:
echo "Uploaded documentation"
fi
- |
- if [[ "$TRAVIS_RUST_VERSION" == "nightly-2019-03-02" ]]; then
+ if [[ "$TRAVIS_RUST_VERSION" == "nightly-2019-04-02" ]]; then
taskset -c 0 cargo tarpaulin --out Xml --all --all-features
bash <(curl -s https://codecov.io/bash)
echo "Uploaded code coverage"
diff --git a/CHANGES.md b/CHANGES.md
index 7fb3b8341..3965a7d16 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,13 +1,27 @@
# Changes
+## [1.0.0-alpha.4] - 2019-04-xx
+
+### Added
+
+* `App::configure()` allow to offload app configuration to different methods
+
+* Added `URLPath` option for logger
+
+### Changed
+
+* Move multipart support to actix-multipart crate
+
+
+## [1.0.0-alpha.3] - 2019-04-02
+
### Changed
* Renamed `TestRequest::to_service()` to `TestRequest::to_srv_request()`
* Renamed `TestRequest::to_response()` to `TestRequest::to_srv_response()`
-* Added `URLPath` option for logger
-
+* Removed `Deref` impls
### Removed
diff --git a/Cargo.toml b/Cargo.toml
index b5d0e8769..507be4bb4 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -30,8 +30,10 @@ members = [
"actix-http",
"actix-files",
"actix-session",
+ "actix-multipart",
"actix-web-actors",
"actix-web-codegen",
+ "test-server",
]
[package.metadata.docs.rs]
@@ -71,18 +73,17 @@ actix-utils = "0.3.4"
actix-router = "0.1.0"
actix-rt = "0.2.2"
actix-web-codegen = "0.1.0-alpha.1"
-actix-http = { version = "0.1.0-alpha.2", features=["fail"] }
+actix-http = { version = "0.1.0-alpha.3", features=["fail"] }
actix-server = "0.4.2"
actix-server-config = "0.1.0"
actix-threadpool = "0.1.0"
-awc = { version = "0.1.0-alpha.2", optional = true }
+awc = { version = "0.1.0-alpha.3", optional = true }
bytes = "0.4"
derive_more = "0.14"
encoding = "0.2"
futures = "0.1"
hashbrown = "0.1.8"
-httparse = "1.3"
log = "0.4"
mime = "0.3"
net2 = "0.2.33"
@@ -100,8 +101,8 @@ openssl = { version="0.10", optional = true }
rustls = { version = "^0.15", optional = true }
[dev-dependencies]
-actix-http = { version = "0.1.0-alpha.2", features=["ssl", "brotli", "flate2-zlib"] }
-actix-http-test = { version = "0.1.0-alpha.2", features=["ssl"] }
+actix-http = { version = "0.1.0-alpha.3", features=["ssl", "brotli", "flate2-zlib"] }
+actix-http-test = { version = "0.1.0-alpha.3", features=["ssl"] }
rand = "0.6"
env_logger = "0.6"
serde_derive = "1.0"
@@ -116,4 +117,11 @@ codegen-units = 1
[patch.crates-io]
actix = { git = "https://github.com/actix/actix.git" }
+actix-web = { path = "." }
actix-http = { path = "actix-http" }
+actix-http-test = { path = "test-server" }
+actix-web-codegen = { path = "actix-web-codegen" }
+actix-web-actors = { path = "actix-web-actors" }
+actix-session = { path = "actix-session" }
+actix-files = { path = "actix-files" }
+awc = { path = "awc" }
diff --git a/actix-files/CHANGES.md b/actix-files/CHANGES.md
index 4fe8fadb3..7c46b40f7 100644
--- a/actix-files/CHANGES.md
+++ b/actix-files/CHANGES.md
@@ -1,6 +1,6 @@
# Changes
-## [0.1.0-alpha.2] - 2019-04-xx
+## [0.1.0-alpha.2] - 2019-04-02
* Add default handler support
diff --git a/actix-files/Cargo.toml b/actix-files/Cargo.toml
index 3f1bad69e..a1044c6da 100644
--- a/actix-files/Cargo.toml
+++ b/actix-files/Cargo.toml
@@ -18,7 +18,7 @@ name = "actix_files"
path = "src/lib.rs"
[dependencies]
-actix-web = "1.0.0-alpha.2"
+actix-web = "1.0.0-alpha.3"
actix-service = "0.3.4"
bitflags = "1"
bytes = "0.4"
@@ -31,4 +31,4 @@ percent-encoding = "1.0"
v_htmlescape = "0.4"
[dev-dependencies]
-actix-web = { version = "1.0.0-alpha.2", features=["ssl"] }
+actix-web = { version = "1.0.0-alpha.3", features=["ssl"] }
diff --git a/actix-files/src/lib.rs b/actix-files/src/lib.rs
index d5a47653e..8404ab319 100644
--- a/actix-files/src/lib.rs
+++ b/actix-files/src/lib.rs
@@ -552,7 +552,7 @@ impl
FromRequest
for PathBufWrp {
type Future = Result;
fn from_request(req: &mut ServiceFromRequest) -> Self::Future {
- PathBufWrp::get_pathbuf(req.match_info().path())
+ PathBufWrp::get_pathbuf(req.request().match_info().path())
}
}
@@ -1049,7 +1049,7 @@ mod tests {
.new_service(&()),
)
.unwrap();
- let req = TestRequest::with_uri("/missing").to_service();
+ let req = TestRequest::with_uri("/missing").to_srv_request();
let mut resp = test::call_success(&mut st, req);
assert_eq!(resp.status(), StatusCode::OK);
diff --git a/actix-http/CHANGES.md b/actix-http/CHANGES.md
index 79187e7a5..742ff8d3e 100644
--- a/actix-http/CHANGES.md
+++ b/actix-http/CHANGES.md
@@ -1,6 +1,20 @@
# Changes
-## [0.1.0-alpha.3] - 2019-04-xx
+## [0.1.0-alpha.4] - 2019-04-xx
+
+### Changed
+
+* Export IntoHeaderValue
+
+### Deleted
+
+* Removed PayloadBuffer
+
+## [0.1.0-alpha.3] - 2019-04-02
+
+### Added
+
+* Warn when an unsealed private cookie isn't valid UTF-8
### Fixed
@@ -8,6 +22,8 @@
* Preallocate read buffer for h1 codec
+* Detect socket disconnection during protocol selection
+
## [0.1.0-alpha.2] - 2019-03-29
diff --git a/actix-http/Cargo.toml b/actix-http/Cargo.toml
index a9fda44eb..9d4e15216 100644
--- a/actix-http/Cargo.toml
+++ b/actix-http/Cargo.toml
@@ -100,7 +100,7 @@ openssl = { version="0.10", optional = true }
actix-rt = "0.2.2"
actix-server = { version = "0.4.1", features=["ssl"] }
actix-connect = { version = "0.1.0", features=["ssl"] }
-actix-http-test = { version = "0.1.0-alpha.2", features=["ssl"] }
+actix-http-test = { version = "0.1.0-alpha.3", features=["ssl"] }
env_logger = "0.6"
serde_derive = "1.0"
openssl = { version="0.10" }
diff --git a/actix-http/src/h1/client.rs b/actix-http/src/h1/client.rs
index 6a50c0271..f93bc496a 100644
--- a/actix-http/src/h1/client.rs
+++ b/actix-http/src/h1/client.rs
@@ -10,7 +10,7 @@ use http::header::{
use http::{Method, Version};
use super::decoder::{PayloadDecoder, PayloadItem, PayloadType};
-use super::{decoder, encoder};
+use super::{decoder, encoder, reserve_readbuf};
use super::{Message, MessageType};
use crate::body::BodySize;
use crate::config::ServiceConfig;
@@ -150,6 +150,7 @@ impl Decoder for ClientCodec {
} else {
self.inner.payload = None;
}
+ reserve_readbuf(src);
Ok(Some(req))
} else {
Ok(None)
@@ -168,7 +169,10 @@ impl Decoder for ClientPayloadCodec {
);
Ok(match self.inner.payload.as_mut().unwrap().decode(src)? {
- Some(PayloadItem::Chunk(chunk)) => Some(Some(chunk)),
+ Some(PayloadItem::Chunk(chunk)) => {
+ reserve_readbuf(src);
+ Some(Some(chunk))
+ }
Some(PayloadItem::Eof) => {
self.inner.payload.take();
Some(None)
diff --git a/actix-http/src/h1/codec.rs b/actix-http/src/h1/codec.rs
index e4895f2dd..6e891e7cd 100644
--- a/actix-http/src/h1/codec.rs
+++ b/actix-http/src/h1/codec.rs
@@ -9,7 +9,7 @@ use http::header::{HeaderValue, CONNECTION, CONTENT_LENGTH, DATE, TRANSFER_ENCOD
use http::{Method, StatusCode, Version};
use super::decoder::{PayloadDecoder, PayloadItem, PayloadType};
-use super::{decoder, encoder};
+use super::{decoder, encoder, reserve_readbuf};
use super::{Message, MessageType};
use crate::body::BodySize;
use crate::config::ServiceConfig;
@@ -19,9 +19,6 @@ use crate::message::{ConnectionType, Head, ResponseHead};
use crate::request::Request;
use crate::response::Response;
-const LW: usize = 2 * 1024;
-const HW: usize = 32 * 1024;
-
bitflags! {
struct Flags: u8 {
const HEAD = 0b0000_0001;
@@ -108,14 +105,12 @@ impl Decoder for Codec {
type Error = ParseError;
fn decode(&mut self, src: &mut BytesMut) -> Result