1
0
mirror of https://github.com/fafhrd91/actix-web synced 2024-11-24 08:22:59 +01:00
Commit Graph

3021 Commits

Author SHA1 Message Date
Nikolay Kim
f2b3dc5625 update examples 2019-11-26 17:16:33 +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
Nikolay Kim
c1c44a7dd6 upgrade derive_more 2019-11-25 17:59:14 +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
Martell Malone
525c22de15 fix typos from updating to futures 0.3 2019-11-22 13:25:55 +06:00
Nikolay Kim
57981ca04a update tests to async handlers 2019-11-22 11:49:35 +06:00
Nikolay Kim
e668acc596 update travis config 2019-11-22 10:13:32 +06:00
Nikolay Kim
512dd2be63 disable rustls support 2019-11-22 07:01:05 +06:00
Nikolay Kim
8683ba8bb0 rename .to_async() to .to() 2019-11-21 21:36:35 +06:00
Nikolay Kim
0b9e3d381b add test with custom connector 2019-11-21 17:36:18 +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
471f82f0e0 migrate actix-multipart 2019-11-21 16:02:17 +06:00
Nikolay Kim
60ada97b3d migrate actix-session 2019-11-21 16:02:17 +06:00
Nikolay Kim
0de101bc4d update actix-web-codegen tests 2019-11-21 16:02:17 +06:00
Nikolay Kim
95e2a0ef2e migrate actix-framed 2019-11-21 16:02:17 +06:00
Nikolay Kim
69cadcdedb migrate actix-files 2019-11-21 16:02:17 +06:00
Nikolay Kim
6ac4ac66b9 migrate actix-cors 2019-11-21 16:02:17 +06:00
Nikolay Kim
3646725cf6 migrate actix-identity 2019-11-21 16:02:17 +06:00
Nikolay Kim
ff62facc0d disable unmigrated crates 2019-11-21 16:02:17 +06:00
Nikolay Kim
b510527a9f update awc tests 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
Nikolay Kim
d081e57316 fix h2 client send body 2019-11-21 16:02:17 +06:00
Nikolay Kim
1ffa7d18d3 drop unpin constraint 2019-11-21 16:02:17 +06:00
Nikolay Kim
687884fb94 update test-server tests 2019-11-21 16:02:17 +06:00
Nikolay Kim
5ab29b2e62 migrate awc and test-server to std::future 2019-11-21 16:02:17 +06:00
Nikolay Kim
a6a2d2f444 update ssl impls 2019-11-21 16:02:17 +06:00
Nikolay Kim
9e95efcc16 migrate client to std::future 2019-11-21 16:02:17 +06:00
Nikolay Kim
8cba1170e6 make actix-http compile with std::future 2019-11-21 16:02:17 +06:00
Nikolay Kim
5cb2d500d1 update actix-web-actors 2019-11-14 08:58:24 +06:00
Nikolay Kim
0212c618c6 prepare actix-web release 2019-11-14 08:55:37 +06:00
Feiko Nanninga
88110ed268 Add security note to ConnectionInfo::remote() (#1158) 2019-11-14 08:32:47 +06:00
Nikolay Kim
fba02fdd8c prep awc release 2019-11-06 11:33:25 -08:00
Nikolay Kim
b2934ad8d2 prep actix-file release 2019-11-06 11:25:26 -08:00
Nikolay Kim
f7f410d033 fix test order dep 2019-11-06 11:20:47 -08:00
Nikolay Kim
885ff7396e prepare actox-http release 2019-11-06 10:35:13 -08:00
Erlend Langseth
61b38e8d0d Increase timeouts in test-server (#1153) 2019-11-06 06:09:22 -08:00
Hung-I Wang
edcde67076 Fix escaping/encoding problems in Content-Disposition header (#1151)
* Fix filename encoding in Content-Disposition of acitx_files::NamedFile

* Add more comments on how to use Content-Disposition header properly & Fix some trivial problems

* Improve Content-Disposition filename(*) parameters of actix_files::NamedFile

* Tweak Content-Disposition parse to accept empty param value in quoted-string

* Fix typos in comments in .../content_disposition.rs (pointed out by @JohnTitor)

* Update CHANGES.md

* Update CHANGES.md again
2019-11-06 06:08:37 -08:00
Jonathas Conceição
f0612f7570 awc: Add support for setting query from Serialize type for client request (#1130)
Signed-off-by: Jonathas-Conceicao <jadoliveira@inf.ufpel.edu.br>
2019-10-26 08:27:14 +03:00
Anton Lazarev
ace98e3a1e support Host guards when Host header is unset (#1129) 2019-10-15 05:05:54 +06:00
Nikolay Kim
1ca9d87f0a prep actix-web-codegen release 2019-10-14 21:35:53 +06:00
DanSnow
967f965405 Update syn & quote to 1.0 (#1133)
* chore(actix-web-codegen): Upgrade syn and quote to 1.0

* feat(actix-web-codegen): Generate better error message

* doc(actix-web-codegen): Update CHANGES.md

* fix: Build with stable rust
2019-10-14 21:34:17 +06:00
Nikolay Kim
062e51e8ce prep actix-file release 2019-10-14 21:26:26 +06:00
Roberto Huertas
a48e616def feat(files): add possibility to redirect to slash-ended path (#1134)
When accessing to a folder without a final slash, the index file will be loaded ok, but if it has
references (like a css or an image in an html file) these resources won't be loaded correctly if
they are using relative paths. In order to solve this, this PR adds the possibility to detect
folders without a final slash and make a 302 redirect to mitigate this issue. The behavior is off by
default. We're adding a new method called `redirect_to_slash_directory` which can be used to enable
this behavior.
2019-10-14 21:23:15 +06:00
MaySantucci
effa96f5e4 Removed httpcode 'MovedPermanenty'. (#1128) 2019-10-12 06:45:12 +06:00
Nathan
cc0b4be5b7 Fix typo in response.rs body() comment (#1126)
Fixes https://github.com/actix/actix-web/issues/1125
2019-10-09 19:11:55 +06:00
Nikolay Kim
a464ffc23d prepare actix-files release 2019-10-08 10:13:16 +06:00
Naim A
4de2e8a898 [actix-files] Allow user defined guards for NamedFile (actix#1113) (#1115)
* [actix-files] remove request method checks from NamedFile

* [actix-files] added custom guard checks to FilesService

* [actix-files] modify method check tests (NamedFile -> Files)

* [actix-files] add test for custom guards in Files

* [actix-files] update changelog
2019-10-08 10:09:40 +06:00