diff --git a/actix_redis/Cargo.toml b/actix_redis/Cargo.toml index 7229262..bbc6f43 100644 --- a/actix_redis/Cargo.toml +++ b/actix_redis/Cargo.toml @@ -6,8 +6,8 @@ edition = "2018" workspace = ".." [dependencies] -actix = "0.8.0-alpha.2" -actix-web = "1.0.0-alpha.4" +actix = "0.8.1" +actix-web = "1.0.0-beta.3" actix-redis = { git="https://github.com/actix/actix-redis.git" } futures = "0.1.23" redis-async = "0.4.0" diff --git a/actix_todo/Cargo.toml b/actix_todo/Cargo.toml index 6e3acb9..3fae688 100644 --- a/actix_todo/Cargo.toml +++ b/actix_todo/Cargo.toml @@ -6,9 +6,9 @@ workspace = ".." edition = "2018" [dependencies] -actix-web = "1.0.0-alpha.4" -actix-files = "0.1.0-alpha.4" -actix-session = "0.1.0-alpha.4" +actix-web = "1.0.0-beta.3" +actix-files = "0.1.0-beta.1" +actix-session = "0.1.0-beta.2" dotenv = "0.13.0" env_logger = "0.5.10" futures = "0.1.22" diff --git a/async_db/Cargo.toml b/async_db/Cargo.toml index 8063ead..3c73fc4 100644 --- a/async_db/Cargo.toml +++ b/async_db/Cargo.toml @@ -7,7 +7,7 @@ workspace = ".." [dependencies] actix-rt = "0.2" -actix-web = "1.0.0-alpha.4" +actix-web = "1.0.0-beta.3" dotenv = "0.10" env_logger = "0.5" diff --git a/basics/Cargo.toml b/basics/Cargo.toml index e16db24..2a27e7c 100644 --- a/basics/Cargo.toml +++ b/basics/Cargo.toml @@ -7,9 +7,9 @@ edition = "2018" [dependencies] actix-rt = "0.2" -actix-web = "1.0.0-alpha.4" -actix-files = "0.1.0-alpha.4" -actix-session = "0.1.0-alpha.4" +actix-web = "1.0.0-beta.3" +actix-files = "0.1.0-beta.1" +actix-session = "0.1.0-beta.2" futures = "0.1.25" env_logger = "0.5" diff --git a/cookie-auth/Cargo.toml b/cookie-auth/Cargo.toml index 66d02b6..34897fd 100644 --- a/cookie-auth/Cargo.toml +++ b/cookie-auth/Cargo.toml @@ -6,5 +6,5 @@ edition = "2018" workspace = ".." [dependencies] -actix-web = "1.0.0-alpha.4" +actix-web = "1.0.0-beta.3" env_logger = "0.6" diff --git a/cookie-session/Cargo.toml b/cookie-session/Cargo.toml index 2a76fa6..ed47386 100644 --- a/cookie-session/Cargo.toml +++ b/cookie-session/Cargo.toml @@ -6,8 +6,8 @@ workspace = ".." edition = "2018" [dependencies] -actix-web = "1.0.0-alpha.4" -actix-session = "0.1.0-alpha.4" +actix-web = "1.0.0-beta.3" +actix-session = "0.1.0-beta.2" futures = "0.1" time = "0.1" diff --git a/diesel/Cargo.toml b/diesel/Cargo.toml index 5c534ce..4723760 100644 --- a/diesel/Cargo.toml +++ b/diesel/Cargo.toml @@ -6,7 +6,7 @@ workspace = ".." edition = "2018" [dependencies] -actix-web = "1.0.0-alpha.4" +actix-web = "1.0.0-beta.3" bytes = "0.4" env_logger = "0.6" diff --git a/diesel/src/main.rs b/diesel/src/main.rs index fdf3cbc..80dbc8b 100644 --- a/diesel/src/main.rs +++ b/diesel/src/main.rs @@ -137,22 +137,20 @@ fn main() -> std::io::Result<()> { // Use of the extractors makes some post conditions simpler such // as size limit protections and built in json validation. .service( - web::resource("/add2").route( - web::post() - .data( - web::JsonConfig::default() - .limit(4096) // <- limit size of the payload - .error_handler(|err, _| { - // <- create custom error response - error::InternalError::from_response( - err, - HttpResponse::Conflict().finish(), - ) - .into() - }), - ) - .to_async(add2), - ), + web::resource("/add2") + .data( + web::JsonConfig::default() + .limit(4096) // <- limit size of the payload + .error_handler(|err, _| { + // <- create custom error response + error::InternalError::from_response( + err, + HttpResponse::Conflict().finish(), + ) + .into() + }), + ) + .route(web::post().to_async(add2)), ) // Manual parsing would allow custom error construction, use of // other parsers *beside* json (for example CBOR, protobuf, xml), and allows diff --git a/error_handling/Cargo.toml b/error_handling/Cargo.toml index 9e0b003..ef3c168 100644 --- a/error_handling/Cargo.toml +++ b/error_handling/Cargo.toml @@ -6,7 +6,7 @@ edition = "2018" workspace = ".." [dependencies] -actix-web = "1.0.0-alpha.4" +actix-web = "1.0.0-beta.3" derive_more = "0.14.0" futures = "0.1.23" diff --git a/form/Cargo.toml b/form/Cargo.toml index 1f98368..c2fdcbf 100644 --- a/form/Cargo.toml +++ b/form/Cargo.toml @@ -6,7 +6,7 @@ edition = "2018" workspace = ".." [dependencies] -actix-web = "1.0.0-alpha.4" +actix-web = "1.0.0-beta.3" serde = "1.0" serde_derive = "1.0" diff --git a/hello-world/Cargo.toml b/hello-world/Cargo.toml index 733faa5..8176a1f 100644 --- a/hello-world/Cargo.toml +++ b/hello-world/Cargo.toml @@ -6,5 +6,5 @@ workspace = ".." edition = "2018" [dependencies] -actix-web = "1.0.0-alpha.4" +actix-web = "1.0.0-beta.3" env_logger = "0.6" diff --git a/http-full-proxy/Cargo.toml b/http-full-proxy/Cargo.toml index 5e7f4f7..21383f3 100644 --- a/http-full-proxy/Cargo.toml +++ b/http-full-proxy/Cargo.toml @@ -7,7 +7,7 @@ edition = "2018" [dependencies] actix-rt = "0.2" -actix-web = "1.0.0-alpha.5" +actix-web = "1.0.0-beta.3" clap = "2.32.0" futures = "0.1.25" diff --git a/http-proxy/Cargo.toml b/http-proxy/Cargo.toml index 9afc29e..5cb4a0e 100644 --- a/http-proxy/Cargo.toml +++ b/http-proxy/Cargo.toml @@ -15,7 +15,7 @@ path = "src/server.rs" [dependencies] actix-rt = "0.2" -actix-web = "1.0.0-alpha.4" +actix-web = "1.0.0-beta.3" env_logger = "0.5" futures = "0.1" diff --git a/json/Cargo.toml b/json/Cargo.toml index eab6ddb..207cc60 100644 --- a/json/Cargo.toml +++ b/json/Cargo.toml @@ -6,7 +6,7 @@ workspace = ".." edition = "2018" [dependencies] -actix-web = "1.0.0-alpha.4" +actix-web = "1.0.0-beta.3" bytes = "0.4" futures = "0.1" diff --git a/json/src/main.rs b/json/src/main.rs index 9b0d9a5..86f2a24 100644 --- a/json/src/main.rs +++ b/json/src/main.rs @@ -83,19 +83,12 @@ fn main() -> std::io::Result<()> { App::new() // enable logger .wrap(middleware::Logger::default()) + .data(web::JsonConfig::default().limit(4096)) // <- limit size of the payload (global configuration) + .service(web::resource("/extractor").route(web::post().to(index))) .service( - web::resource("/extractor").route( - web::post() - .data(web::JsonConfig::default().limit(4096)) // <- limit size of the payload - .to(index), - ), - ) - .service( - web::resource("/extractor2").route( - web::post() - .data(web::JsonConfig::default().limit(4096)) // <- limit size of the payload - .to_async(extract_item), - ), + web::resource("/extractor2") + .data(web::JsonConfig::default().limit(1024)) // <- limit size of the payload (resource level) + .route(web::post().to_async(extract_item)), ) .service(web::resource("/manual").route(web::post().to_async(index_manual))) .service( diff --git a/jsonrpc/Cargo.toml b/jsonrpc/Cargo.toml index 6541061..720f44a 100644 --- a/jsonrpc/Cargo.toml +++ b/jsonrpc/Cargo.toml @@ -6,8 +6,8 @@ edition = "2018" workspace = ".." [dependencies] -actix = "0.8.0-alpha.2" -actix-web = "1.0.0-alpha.4" +actix = "0.8.1" +actix-web = "1.0.0-beta.3" env_logger = "0.6" futures = "0.1.23" futures-timer = "0.1" diff --git a/juniper/Cargo.toml b/juniper/Cargo.toml index 71f410c..54c8258 100644 --- a/juniper/Cargo.toml +++ b/juniper/Cargo.toml @@ -6,7 +6,7 @@ workspace = ".." edition = "2018" [dependencies] -actix-web = "1.0.0-alpha.4" +actix-web = "1.0.0-beta.3" env_logger = "0.6" futures = "0.1" serde = "1.0" diff --git a/middleware/Cargo.toml b/middleware/Cargo.toml index e6d9cc3..b17594f 100644 --- a/middleware/Cargo.toml +++ b/middleware/Cargo.toml @@ -7,6 +7,6 @@ workspace = ".." [dependencies] actix-service = "0.3.6" -actix-web = "1.0.0-alpha.4" +actix-web = "1.0.0-beta.3" futures = "0.1.25" env_logger = "0.6" \ No newline at end of file diff --git a/multipart/Cargo.toml b/multipart/Cargo.toml index 256683d..5fc3e2a 100644 --- a/multipart/Cargo.toml +++ b/multipart/Cargo.toml @@ -10,7 +10,7 @@ name = "multipart" path = "src/main.rs" [dependencies] -actix-web = "1.0.0-beta.1" +actix-web = "1.0.0-beta.3" actix-multipart = "0.1.0-beta.1" env_logger = "0.6" diff --git a/multipart/src/main.rs b/multipart/src/main.rs index da7b929..791b794 100644 --- a/multipart/src/main.rs +++ b/multipart/src/main.rs @@ -23,11 +23,10 @@ pub fn save_file(field: Field) -> impl Future { // fs operations are blocking, we have to execute writes // on threadpool web::block(move || { - file.write_all(bytes.as_ref()) - .map_err(|e| { - println!("file.write_all failed: {:?}", e); - MultipartError::Payload(error::PayloadError::Io(e)) - })?; + file.write_all(bytes.as_ref()).map_err(|e| { + println!("file.write_all failed: {:?}", e); + MultipartError::Payload(error::PayloadError::Io(e)) + })?; acc += bytes.len() as i64; Ok((file, acc)) }) diff --git a/protobuf/Cargo.toml b/protobuf/Cargo.toml index a20640b..c80df97 100644 --- a/protobuf/Cargo.toml +++ b/protobuf/Cargo.toml @@ -13,4 +13,4 @@ derive_more = "0.14" prost = "0.2.0" prost-derive = "0.2.0" -actix-web = "1.0.0-alpha.4" +actix-web = "1.0.0-beta.3" diff --git a/r2d2/Cargo.toml b/r2d2/Cargo.toml index 86e70e3..f869e4e 100644 --- a/r2d2/Cargo.toml +++ b/r2d2/Cargo.toml @@ -7,7 +7,7 @@ workspace = ".." [dependencies] actix-rt = "0.2" -actix-web = "1.0.0-alpha.4" +actix-web = "1.0.0-beta.3" futures = "0.1" env_logger = "0.6" diff --git a/redis-session/Cargo.toml b/redis-session/Cargo.toml index fc347f8..19ac65a 100644 --- a/redis-session/Cargo.toml +++ b/redis-session/Cargo.toml @@ -6,8 +6,8 @@ workspace = ".." edition = "2018" [dependencies] -actix = "0.8.0-alpha.2" -actix-web = "1.0.0-alpha.4" -actix-session = "0.1.0-alpha.4" +actix = "0.8.1" +actix-web = "1.0.0-beta.3" +actix-session = "0.1.0-beta.2" actix-redis = { git = "https://github.com/actix/actix-redis.git", features = ["web"] } env_logger = "0.6" diff --git a/simple-auth-server/Cargo.toml b/simple-auth-server/Cargo.toml index 54d2a5e..ec815e9 100644 --- a/simple-auth-server/Cargo.toml +++ b/simple-auth-server/Cargo.toml @@ -8,7 +8,7 @@ workspace = ".." [dependencies] actix = { version = "0.8.1", features = ["http"] } actix-rt = "0.2.2" -actix-web = "1.0.0-beta.1" +actix-web = "1.0.0-beta.3" actix-files = "0.1.0-beta.1" bcrypt = "0.2.1" diff --git a/state/Cargo.toml b/state/Cargo.toml index 894d49d..b0be556 100644 --- a/state/Cargo.toml +++ b/state/Cargo.toml @@ -6,6 +6,6 @@ workspace = ".." edition = "2018" [dependencies] -actix-web = "1.0.0-alpha.4" +actix-web = "1.0.0-beta.3" futures = "0.1.25" env_logger = "0.6" diff --git a/static_index/Cargo.toml b/static_index/Cargo.toml index 196e112..a515340 100644 --- a/static_index/Cargo.toml +++ b/static_index/Cargo.toml @@ -9,5 +9,5 @@ edition = "2018" futures = "0.1" env_logger = "0.5" -actix-web = "1.0.0-alpha.4" -actix-files = "0.1.0-alpha.4" +actix-web = "1.0.0-beta.3" +actix-files = "0.1.0-beta.1" diff --git a/template_askama/Cargo.toml b/template_askama/Cargo.toml index 09fc9e8..8cecb14 100644 --- a/template_askama/Cargo.toml +++ b/template_askama/Cargo.toml @@ -6,7 +6,7 @@ workspace = ".." edition = "2018" [dependencies] -actix-web = "1.0.0-alpha.4" +actix-web = "1.0.0-beta.3" env_logger = "0.6" askama = "0.8" diff --git a/template_tera/Cargo.toml b/template_tera/Cargo.toml index 700f4f8..5c00ba1 100644 --- a/template_tera/Cargo.toml +++ b/template_tera/Cargo.toml @@ -8,4 +8,4 @@ edition = "2018" [dependencies] env_logger = "0.6" tera = "0.11" -actix-web = "1.0.0-alpha.4" +actix-web = "1.0.0-beta.3" diff --git a/template_yarte/Cargo.toml b/template_yarte/Cargo.toml index 24eba8e..81d5e9c 100644 --- a/template_yarte/Cargo.toml +++ b/template_yarte/Cargo.toml @@ -12,7 +12,7 @@ env_logger = "0.6" yarte = { version = "0.2", features=["with-actix-web"] } -actix-web = "1.0.0-alpha.4" +actix-web = "1.0.0-beta.3" [build-dependencies] yarte = { version = "0.2", features=["with-actix-web"] } diff --git a/web-cors/backend/Cargo.toml b/web-cors/backend/Cargo.toml index 1930906..39e779e 100644 --- a/web-cors/backend/Cargo.toml +++ b/web-cors/backend/Cargo.toml @@ -6,7 +6,7 @@ workspace = "../../" edition = "2018" [dependencies] -actix-web = "1.0.0-alpha.4" +actix-web = "1.0.0-beta.3" serde = "1.0" serde_derive = "1.0" serde_json = "1.0" diff --git a/websocket-chat/Cargo.toml b/websocket-chat/Cargo.toml index e59f220..fe62f8b 100644 --- a/websocket-chat/Cargo.toml +++ b/websocket-chat/Cargo.toml @@ -10,10 +10,10 @@ name = "websocket-chat-server" path = "src/main.rs" [dependencies] -actix = "0.8.0-alpha.2" -actix-web = "1.0.0-alpha.4" -actix-web-actors = "1.0.0-alpha.2" -actix-files = "0.1.0-alpha.4" +actix = "0.8.1" +actix-web = "1.0.0-beta.3" +actix-web-actors = "1.0.0-alpha.3" +actix-files = "0.1.0-beta.1" rand = "0.6" bytes = "0.4" diff --git a/websocket-tcp-chat/Cargo.toml b/websocket-tcp-chat/Cargo.toml index b812bfa..330357f 100644 --- a/websocket-tcp-chat/Cargo.toml +++ b/websocket-tcp-chat/Cargo.toml @@ -14,10 +14,10 @@ name = "websocket-tcp-client" path = "src/client.rs" [dependencies] -actix = "0.8.0-alpha.2" -actix-web = "1.0.0-alpha.4" +actix = "0.8.1" +actix-web = "1.0.0-beta.3" actix-web-actors = "1.0.0-alpha.3" -actix-files = "0.1.0-alpha.4" +actix-files = "0.1.0-beta.1" rand = "0.6" bytes = "0.4" diff --git a/websocket/Cargo.toml b/websocket/Cargo.toml index 1c67978..f4767c8 100644 --- a/websocket/Cargo.toml +++ b/websocket/Cargo.toml @@ -14,10 +14,10 @@ path = "src/main.rs" #path = "src/client.rs" [dependencies] -actix = "0.8.0-alpha.2" -actix-web = "1.0.0-alpha.4" +actix = "0.8.1" +actix-web = "1.0.0-beta.3" actix-web-actors = "1.0.0-alpha.3" -actix-files = "0.1.0-alpha.4" +actix-files = "0.1.0-beta.1" env_logger = "0.6" futures = "0.1" bytes = "0.4" \ No newline at end of file