Commit Graph

1691 Commits

Author SHA1 Message Date
Nikolay Kim a4ad5e6b69 update timeouts for test server 2019-12-25 20:52:20 +04:00
Nikolay Kim 7b3c99b933 prep actix-framed release 2019-12-25 20:17:22 +04:00
Nikolay Kim f86ce0390e allow to specify multi pattern for resources 2019-12-25 20:14:44 +04:00
Nikolay Kim 7882f545e5 Allow to gracefully stop test server via TestServer::stop() 2019-12-25 12:10:48 +04:00
Nikolay Kim 6a0cd2dced Rename HttpServer::start() to HttpServer::run() 2019-12-22 17:12:22 +04:00
Nikolay Kim c7f3915779 update actix-service dep 2019-12-22 16:39:25 +04:00
Yuki Okushi f45db1f909
Enable GitHub Actions and fix file URL behavior (#1232)
* Use GitHub Actions

* Fix unused imports on Windows

* Fix test for Windows

* Stop to run CI for i686-pc-windows-msvc for now

* Use `/` instead of `\` on Windows

* Add entry to changelog

* Prepare actix-files release
2019-12-22 16:43:41 +09:00
Darin 3751a4018e fixed test::init_service api docs (missing await) (#1230) 2019-12-21 08:47:18 +06:00
Nikolay Kim 0cb1b0642f add test server data test 2019-12-20 23:18:59 +06:00
Nikolay Kim 2b4256baab add links to configs 2019-12-20 17:49:05 +06:00
Nikolay Kim e5a50f423d Make web::Data deref to Arc<T> #1214 2019-12-20 17:45:35 +06:00
Nikolay Kim 8b8a9a995d bump ver 2019-12-20 17:36:48 +06:00
Nikolay Kim c877840c07 rename App::register_data to App::app_data and HttpRequest::app_data returns Option<&T> instead of Option<&Data<T>> 2019-12-20 17:13:09 +06:00
Nikolay Kim 20248daeda Allow to set peer_addr for TestRequest #1074 2019-12-20 16:11:51 +06:00
Nikolay Kim a08d8dab70 AppConfig::secure() is always false. #1202 2019-12-20 16:04:51 +06:00
Nikolay Kim 1732ae8c79 fix Bodyencoding trait usage 2019-12-18 09:30:14 +06:00
Nikolay Kim 01613f334b Move BodyEncoding to dev module #1220 2019-12-16 17:22:26 +06:00
Nikolay Kim a153374b61 migrate actix-web-actors 2019-12-15 22:45:38 +06:00
Nikolay Kim cb705317b8 compile with default-features off 2019-12-15 13:28:54 +06:00
Nikolay Kim db1d6b7963 refactor test server impl 2019-12-12 22:28:47 +06:00
Nikolay Kim fa07415721 Replace flate2-xxx features with compress 2019-12-12 15:08:08 +06:00
Nikolay Kim 131c897099 upgrade to actix-net release 2019-12-11 19:20:20 +06:00
Nikolay Kim ef3a33b9d6 use std mutext instead of parking_lot 2019-12-10 09:00:51 +06:00
Sameer Dhar e4382e4fc1 Fix broken docs (#1204)
Fixed un escaped brackets in lib.rs, and reflowed links to ConnectionInfo in app, config, and server.rs
2019-12-09 10:02:43 +06:00
Nikolay Kim 1f3ffe38e8 update actix-service dep 2019-12-08 19:25:24 +06:00
Nikolay Kim 4a8a9ef405 update tests and clippy warnings 2019-12-08 12:31:16 +06:00
Nikolay Kim 6c9f9fff73 clippy warnings 2019-12-08 00:46:51 +06:00
Nikolay Kim 8df33f7a81 remove HttpServer::run() as it is not useful with async/await 2019-12-08 00:06:04 +06:00
daxpedda e5f3d88a4e Switch brotli compressor to rust. (#1197)
* Switch to a rustified version of brotli.

* Some memory optimizations.

* Make brotli not optional anymore.
2019-12-07 21:55:41 +06:00
Nikolay Kim ed2f3fe80d use actix-net alpha.3 release 2019-12-07 12:28:26 +06:00
Nikolay Kim 205a964d8f upgrade to tokio 0.2 2019-12-05 23:35:43 +06:00
Nikolay Kim b45c6cd66b replace hashbrown with std hashmap 2019-12-04 18:33:43 +06:00
Nikolay Kim 14075ebf7f use released versions of actix-net 2019-12-02 23:33:39 +06:00
Nikolay Kim 068f047dd5 update service factory config 2019-12-02 21:37:13 +06:00
Nikolay Kim f4c01384ec update to latest actix-net 2019-12-02 17:33:11 +06:00
Nikolay Kim f73f97353b refactor ResponseError trait 2019-11-26 16:07:39 +06:00
Nikolay Kim 4dc31aac93 use actix_rt::test for test setup 2019-11-26 11:25:50 +06:00
Jim Blandy c5907747ad Remove implementation of Responder for (). Fixes #1108.
Rationale:

- In Rust, one can omit a semicolon after a function's final expression to make
  its value the function's return value. It's common for people to include a
  semicolon after the last expression by mistake - common enough that the Rust
  compiler suggests removing the semicolon when there's a type mismatch between
  the function's signature and body. By implementing Responder for (), Actix makes
  this common mistake a silent error in handler functions.

- Functions returning an empty body should return HTTP status 204 ("No Content"),
  so the current Responder impl for (), which returns status 200 ("OK"), is not
  really what one wants anyway.

- It's not much of a burden to ask handlers to explicitly return
  `HttpResponse::Ok()` if that is what they want; all the examples in the
  documentation do this already.
2019-11-23 21:10:02 +06:00
Nikolay Kim 8683ba8bb0 rename .to_async() to .to() 2019-11-21 21:36:35 +06:00
Nikolay Kim 1f0577f8d5 cleanup api doc examples 2019-11-21 16:02:17 +06:00
Nikolay Kim 53c5151692 use response instead of result for asyn c handlers 2019-11-21 16:02:17 +06:00
Nikolay Kim 55698f2524 migrade rest of middlewares 2019-11-21 16:02:17 +06:00
Nikolay Kim 3127dd4db6 migrate actix-web to std::future 2019-11-21 16:02:17 +06:00
Feiko Nanninga 88110ed268 Add security note to ConnectionInfo::remote() (#1158) 2019-11-14 08:32:47 +06:00
Nikolay Kim f7f410d033 fix test order dep 2019-11-06 11:20:47 -08:00
Anton Lazarev ace98e3a1e support Host guards when Host header is unset (#1129) 2019-10-15 05:05:54 +06:00
Priit Laes 0f09415469 Convert documentation examples to Rust 2018 edition (#1120)
* Convert types::query examples to rust-2018 edition

* Convert types::json examples to rust-2018 edition

* Convert types::path examples to rust-2018 edition

* Convert types::form examples to rust-2018 edition

* Convert rest of the examples to rust-2018 edition.
2019-10-07 11:29:11 +06:00
Koen Hoeijmakers 15d3c1ae81 Update docs of guard.rs (#1116)
* Update guard.rs
2019-10-07 12:05:17 +09:00
Igor Aleksanov f81ae37677 Add From<Payload> for crate::dev::Payload (#1110)
* Add From<Payload> for crate::dev::Payload

* Make dev::Payload field of Payload public and add into_inner method

* Add changelog entry
2019-10-01 14:05:38 +06:00
Nikolay Kim 5169d306ae update ConnectionInfo.remote() doc string 2019-09-27 07:03:12 +06:00