1
0
mirror of https://github.com/actix/actix-extras.git synced 2024-11-27 17:22:57 +01:00
Commit Graph

3457 Commits

Author SHA1 Message Date
Yuki Okushi
51f5c326ee
Merge pull request #9 from JohnTitor/migrate-httpauth
actix-web-httpauth: Prepare for new release
2020-02-19 10:59:03 +09:00
Yuki Okushi
e245b1cffe Prepare for new release 2020-02-19 09:31:51 +09:00
Yuki Okushi
880206ee2e
Merge pull request #8 from JohnTitor/migrate-redis
actix-redis: Prepare for new release
2020-02-18 10:56:32 +09:00
Yuki Okushi
8bc0227ec8 Fix clippy warning 2020-02-18 08:22:33 +09:00
Yuki Okushi
e225e2aec7 Move env_logger to dev-dependencies 2020-02-18 08:11:36 +09:00
Yuki Okushi
66edc228c3 Prepare for new release 2020-02-18 08:01:26 +09:00
Yuki Okushi
d159b5e5fe
Merge pull request #7 from JohnTitor/migrate-protobuf
Prepare for new release
2020-02-18 07:23:39 +09:00
Yuki Okushi
920bb56919 Prepare for new release 2020-02-18 00:59:04 +09:00
Yuki Okushi
e4ac892be2
Merge pull request #5 from actix/JohnTitor-patch-2
Fix syntax
2020-02-15 01:55:31 +09:00
Yuki Okushi
f3b2aa029a
Merge pull request #4 from actix/JohnTitor-patch-1
Disable coverage for PRs
2020-02-15 01:55:07 +09:00
Yuki Okushi
e5c418eaa3
Fix syntax 2020-02-14 07:42:56 +09:00
Yuki Okushi
c25df0148b
Merge pull request #3 from dotdash/doc_fix
Update Session doc to refer to UserSession instead of RequestSession
2020-02-14 07:41:49 +09:00
Yuki Okushi
de276af9c6
Disable coverage for PRs 2020-02-14 07:27:35 +09:00
Björn Steinbrink
d849157411 Update Session doc to refer to UserSession instead of RequestSession 2020-02-11 16:25:53 +01:00
Björn Steinbrink
3e17ad9a4e Remove unneeded single path import
Imports with a single path component are useless.
2020-02-11 16:25:53 +01:00
Yuki Okushi
e68ec39bd7
Merge pull request #2 from actix/setup-ci
Setup GitHub Actions
2020-01-30 23:14:21 +09:00
Yuki Okushi
650470901b Clean up READMEs 2020-01-30 18:39:35 +09:00
Yuki Okushi
21994c13eb Fix/suppress clippy warnings 2020-01-30 18:21:02 +09:00
Yuki Okushi
d8f3f94ece Clean up metadata 2020-01-30 18:08:20 +09:00
Yuki Okushi
a0337d7851 Run CI with MSRV 2020-01-30 18:03:02 +09:00
Yuki Okushi
c4c0680a6e Remove unused config 2020-01-30 15:57:38 +09:00
Yuki Okushi
91f6519177 Set up GitHub Actions 2020-01-30 15:57:38 +09:00
Rob Ede
8ab2229032
add new crates to workspace 2020-01-30 02:06:00 +00:00
Rob Ede
90e00f7344
fix badge links 2020-01-30 01:50:18 +00:00
Rob Ede
cfb436a363
unify {cors,identity,session} readmes 2020-01-30 01:42:01 +00:00
Rob Ede
13a42f7262
Merge branch 'web' 2020-01-30 01:31:22 +00:00
Rob Ede
4b3500790d
remove non-extra packages 2020-01-30 01:30:52 +00:00
Rob Ede
3cdc0b9d18
fix badges 2020-01-30 01:22:11 +00:00
Rob Ede
aac1158304
merge project metadata 2020-01-30 00:31:25 +00:00
Aaron Hill
276a5a3ee4
Replace UnsafeCell with Cell in DateServiceInner (#1325)
* Replace `UnsafeCell` with `Cell` in `DateServiceInner`

This ensures that it's impossible to cause undefined behavior by
accidentally violating Rust's aliasing rules (e.g. passing a closure to
`set_date` which ends up invoking `reset` or `update` on the inner
`DateServiceInner`).

There might be a tiny amount of overhead from copying the `Option<(Date,
Instant)>` rather than taking a reference, but it shouldn't be
measurable.

Since the wrapped type is `Copy`, a `Cell` can be used, avoiding the
runtime overhead of a `RefCell`.

Co-authored-by: Yuki Okushi <huyuumi.dev@gmail.com>
2020-01-29 21:05:08 +09:00
Rob Ede
e05b153039
Merge branch 'redis' 2020-01-29 12:02:32 +00:00
Rob Ede
849a85fba8
Merge branch 'proto' 2020-01-29 12:02:28 +00:00
Rob Ede
e1f99b0b9a
Merge branch 'httpauth' 2020-01-29 12:02:17 +00:00
Rob Ede
022f329b4f initial commit 2020-01-29 11:44:22 +00:00
Rob Ede
b4267818de move files into module 2020-01-29 11:42:35 +00:00
Rob Ede
dbd52a48a4 move to own module 2020-01-29 11:42:13 +00:00
Rob Ede
2c216e471e move redis to own module 2020-01-29 11:41:40 +00:00
Andrey Kutejko
664f9a8b2d
Long lasting auto-prolonged session (#1292)
Co-authored-by: Yuki Okushi <huyuumi.dev@gmail.com>
2020-01-29 10:26:39 +09:00
Yuki Okushi
c73c2dc12c
Don't use cache in Windows CI (#1327) 2020-01-29 09:00:04 +09:00
kevinpoitra
e634e64847 Upgrade time to 0.2.5 (#1254)
* Use `OffsetDateTime` instead of `PrimitiveDateTime`

* Parse time strings with `PrimitiveDateTime::parse` instead of `OffsetDateTime::parse`

* Remove unused `time` dependency from actix-multipart

* Fix a few errors with time related tests from the `time` upgrade

* Implement logic to convert a RFC 850 two-digit year into a full length year, and organize time parsing related functions

* Upgrade `time` to 0.2.2

* Correctly parse C's asctime time format using time 0.2's new format patterns

* Update CHANGES.md

* Use `time` without any of its deprecated functions

* Enforce a UTC time offset when converting an `OffsetDateTime` into a Header value

* Use the more readable version of `Duration::seconds(0)`, `Duration::zero()`

* Remove unneeded conversion of time::Duration to std::time::Duration

* Use `OffsetDateTime::as_seconds_f64` instead of manually calculating the amount of seconds from nanoseconds

* Replace a few additional instances of `Duration::seconds(0)` with `Duration::zero()`

* Truncate any nanoseconds from a supplied `Duration` within `Cookie::set_max_age` to ensure two Cookies with the same amount whole seconds equate to one another

* Fix the actix-http:🍪:do_not_panic_on_large_max_ages test

* Convert `Cookie::max_age` and `Cookie::expires` examples to `time` 0.2

Mainly minor  changes. Type inference can be used alongside the new
`time::parse` method, such that the type doesn't need to be specified.
This will be useful if a refactoring takes place that changes the type.
There are also new macros, which are used where possible.

One change that is not immediately obvious, in `HttpDate`, there was an
unnecessary conditional. As the time crate allows for negative durations
(and can perform arithmetic with such), the if/else can be removed
entirely.

Time v0.2.3 also has some bug fixes, which is why I am not using a more
general v0.2 in Cargo.toml.

v0.2.3 has been yanked, as it was backwards imcompatible. This version
reverts the breaking change, while still supporting rustc back to
1.34.0.

* Add missing `time::offset` macro import

* Fix type confusion when using `time::parse` followed by `using_offset`

* Update `time` to 0.2.5

* Update CHANGES.md

Co-authored-by: Jacob Pratt <the.z.cuber@gmail.com>
2020-01-28 20:44:22 +09:00
Kai Ren
cdba30d45f Skip empty chucks for BodyStream and SizedStream (#1308)
* Skip empty chucks for BodyStream and SizedStream when streaming response (#1267)

* Fix tests to fail on previous implementation

Co-authored-by: Yuki Okushi <huyuumi.dev@gmail.com>
2020-01-28 18:28:09 +09:00
Aaron Hill
74dcc7366d Remove several uses of Pin::new_unchecked (#1294)
Most of the relevant struct already had a `#[pin_project]` attribute,
but it wasn't being used.

The remaining uses of `Pin::new_unchecked` all involve going from a
`&mut T` to a `Pin<&mut T>`, without directly observing a `Pin<&mut T>`
first. As such, they cannot be replaced by `pin_project`

Co-authored-by: Yuki Okushi <huyuumi.dev@gmail.com>
2020-01-28 12:35:51 +09:00
Aaron Hill
d137a8635b Replace Pin::new_unchecked with #[pin_project] in tuple_from_req! (#1293)
Using some module trickery, we can generate a tuple struct for each
invocation of the macro. This allows us to use `pin_project` to project
through to the tuple fields, removing the need to use
`Pin::new_unchecked`

Co-authored-by: Yuki Okushi <huyuumi.dev@gmail.com>
2020-01-28 10:45:25 +09:00
Yuki Okushi
a2d4ff157e
Update call_service documentation (#1302)
Co-authored-by: Christian Battaglia <christian.d.battaglia@gmail.com>
2020-01-28 08:09:46 +09:00
Andrey Torsunov
71d11644a7 Add ability to name a handler function as 'config' (#1290)
* eliminate handler naming restrictions #1277

* Update actix-web-codegen/CHANGES.md

Co-authored-by: Yuki Okushi <huyuumi.dev@gmail.com>
2020-01-26 07:22:40 +09:00
Maxim Vorobjov
8888520d83 Add benchmark for full stack request lifecycle (#1298)
* add benchmark for full stack request lifecycle

* add direct service benchmarks

* fix newline

* add cloneable service benchmarks

* remove cloneable bench experiments + cargo fmt

Co-authored-by: Yuki Okushi <huyuumi.dev@gmail.com>
2020-01-25 08:05:25 +09:00
Yuki Okushi
3ed6519c0c
Update changelog (#13) 2020-01-25 02:45:24 +09:00
Yuki Okushi
71e2f682e2
Update example (#12)
* Update example

* Check example's build on CI

* Update README
2020-01-25 02:39:32 +09:00
Yuki Okushi
cf3577550c
Tweak caches (#1319)
* Try to use `cargo-cache`

* Tweak issue template
2020-01-25 02:27:13 +09:00
Yuki Okushi
777990d575
Update dependencies and bump up version to 0.5 (#11)
* Bump up bytes to 0.5

* Update example's dependencies

* Bump up version to 0.5
2020-01-24 15:41:57 +09:00