fakeshadow
95113ad12f
do not self wake up when have a payload ( #1984 )
2021-02-12 20:33:13 +00:00
fakeshadow
ce9b2770e2
remove unused Dispatcher::new_timeout ( #1985 )
2021-02-12 10:37:28 +00:00
Rob Ede
4fc7d76759
s/websocket/WebSocket in docs
2021-02-12 00:27:20 +00:00
Rob Ede
c1af5089b9
add 431 and 451 status codes
2021-02-11 22:58:40 +00:00
Rob Ede
77efc09362
hide httpmessage mod
2021-02-11 22:58:40 +00:00
Rob Ede
871ca5e4ae
stop claiming actor support
2021-02-11 22:58:40 +00:00
fakeshadow
ceace26ed4
remove unused flag POLLED ( #1980 )
2021-02-11 14:19:14 -08:00
fakeshadow
75a9a72e78
clean up poll_response. add comments ( #1978 )
2021-02-11 14:54:42 +00:00
fakeshadow
d9d0d1d1a2
reduce unsafe ( #1972 )
2021-02-10 23:11:12 +00:00
fakeshadow
dcad9724bc
ensure poll_flush on h1 connection disconnect ( #1974 )
2021-02-10 10:11:53 +00:00
Rob Ede
949d14ae2b
clean up header map ( #1964 )
2021-02-09 22:59:17 +00:00
fakeshadow
a6ed4aee84
add poll_flush after a non blocked write to h1 dispatcher ( #1971 )
2021-02-09 22:32:46 +00:00
fakeshadow
266cf0622c
reduce branch.remove deadcode for h1 dispatcher ( #1962 )
2021-02-07 22:48:27 +00:00
fakeshadow
4c243cbf89
simplify methods of awc::connect::Connect trait ( #1941 )
2021-02-07 18:56:39 +00:00
fakeshadow
7cfed73be8
fix memory usage for h1 and read bug on buffer size. ( #1929 )
2021-02-07 03:20:35 +00:00
fakeshadow
41bc04b1c4
Use immutable reference of service state. Update awc dns resolver. ( #1905 )
2021-02-07 01:00:40 +00:00
fakeshadow
1c95fc2654
Refactor poll_keepalive for readability ( #1901 )
2021-01-16 00:15:06 +00:00
fakeshadow
d34a8689e5
Refactor h1 encoder ( #1900 )
2021-01-12 14:38:53 +00:00
fakeshadow
7affc6878e
simplify h1 dispatcher ( #1899 )
...
Co-authored-by: Rob Ede <robjtede@icloud.com>
2021-01-11 00:13:56 +00:00
fakeshadow
a4c9aaf337
fix extra branch in h1 dispatcher timer ( #1882 )
2021-01-07 20:42:09 +00:00
fakeshadow
6d710629af
fix bug where upgrade future is not reset properly ( #1880 )
2021-01-07 00:57:34 +00:00
Rob Ede
51e9e1500b
add docs to recent additions
2021-01-06 18:52:06 +00:00
fakeshadow
a03dbe2dcf
replace cloneable service with httpflow abstraction ( #1876 )
2021-01-06 18:43:52 +00:00
Rob Ede
2d4a174420
fmt
2021-01-04 01:01:35 +00:00
Rob Ede
21f6c9d7a5
improve code readability
2021-01-04 00:49:02 +00:00
fakeshadow
32de9f8840
Tokio 1.0 ( #1813 )
...
Co-authored-by: Rob Ede <robjtede@icloud.com>
2021-01-03 23:47:04 +00:00
Rob Ede
1f202d40e4
optimize write_camel_case in h1 encoder ( #1868 )
2021-01-03 16:53:01 +00:00
Rob Ede
093d3a6c59
remove deprecated on_connect methods ( #1857 )
2020-12-27 23:23:30 +00:00
fakeshadow
f9fcf56d5c
reduce branch in actix_http::h1::codec ( #1854 )
2020-12-27 20:37:53 +00:00
fakeshadow
1032f04ded
remove unused actix_http::h1::OneRequest
( #1853 )
2020-12-26 12:46:36 +00:00
fakeshadow
ecf08d5156
Remove boxed future from h1 Dispatcher ( #1836 )
2020-12-24 19:15:17 +00:00
Rob Ede
2a7f2c1d59
dispatcher internals testing ( #1840 )
2020-12-23 01:28:17 +00:00
Juan Aguilar
542db82282
Simplify wake up of task ( #1826 )
2020-12-12 20:07:06 +00:00
Sebastian Mayr
5468c3c410
Drop content length headers from 101 responses ( #1767 )
...
Co-authored-by: Sebastian Mayr <smayr@atlassian.com>
2020-11-02 17:44:14 +09:00
Rob Ede
9963a5ef54
expose on_connect v2 ( #1754 )
...
Co-authored-by: Mikail Bagishov <bagishov.mikail@yandex.ru>
2020-10-30 02:03:26 +00:00
Rob Ede
9d0534999d
bump connect and tls versions ( #1655 )
2020-09-09 09:20:54 +01:00
Rob Ede
9a9d4b182e
document all remaining unsafe usages ( #1642 )
...
adds some debug assertions where appropriate
2020-09-03 10:00:24 +01:00
Rob Ede
8497b5f490
integrate with updated actix-{codec, utils} ( #1634 )
2020-08-24 10:13:35 +01:00
Yuki Okushi
92b5bcd13f
Check format and tweak CI config ( #1619 )
2020-07-22 00:28:33 +01:00
masnagam
701bdacfa2
Fix illegal chunked encoding ( #1615 )
...
Co-authored-by: Rob Ede <robjtede@icloud.com>
2020-07-21 17:24:56 +01:00
Rob Ede
6dc47c4093
fix soundness concern in h1 decoder ( #1614 )
...
Co-authored-by: Yuki Okushi <huyuumi.dev@gmail.com>
2020-07-21 16:25:33 +01:00
Rob Ede
0ec335a39c
bump MSRV to 1.42 ( #1616 )
2020-07-21 16:40:30 +09:00
Andrew
e72ee28232
Enforce HW_BUFFER_SIZE inside h1::dispatcher ( #1550 )
2020-06-17 08:58:23 +01:00
Taiki Endo
6c5c4ea230
Remove uses of pin_project::project attribute
...
pin-project will deprecate the project attribute due to some unfixable
limitations.
Refs: https://github.com/taiki-e/pin-project/issues/225
2020-06-06 06:44:14 +09:00
Rob Ede
7e8ea44d5c
remove needless BodySize::Sized64 variant
2020-05-18 00:42:51 +01:00
Rob Ede
f3b0233477
use mem::take where possible ( #1507 )
2020-05-17 10:54:42 +09:00
Rob Ede
5b0f7fff69
fix spelling errors in doc comments
2020-04-21 04:09:35 +01:00
Yuki Okushi
0d5646a8b6
Run rustfmt
2020-03-08 00:52:39 +09:00
Aaron Hill
e90950fee1
Re-apply commit 2cf7b3ad20
...
This ended up getting reverted by #1367 , which re-introduced an unsound
use of `Pin::new_unchecked`
See my original PR #1374 for the reasoning behind this change.
2020-03-04 11:27:58 -05:00
Yuki Okushi
6cc83dbb67
Allow clippy lint for compatibility
2020-02-27 12:45:11 +09:00
Yuki Okushi
f27dd19093
Fix Clippy warnings
2020-02-27 12:39:04 +09:00
Yuki Okushi
7ba14fd113
Run rustfmt
2020-02-27 11:10:55 +09:00
Maksym Vorobiov
0a86907dd2
use mem::replace instead of mem::take rust 1.40+
2020-02-27 09:37:05 +09:00
Maksym Vorobiov
de815dd99c
Fixed condition for finishing transfer of response
2020-02-27 09:37:05 +09:00
Maksym Vorobiov
c05f9475c5
refactor dispatcher to avoid possible UB with DispatcherState Pin
2020-02-27 09:37:05 +09:00
Maksym Vorobiov
69dab0063c
Get rid of one more unsafe
2020-02-27 09:37:05 +09:00
Maksym Vorobiov
ec5c779732
unlink MessageBody from Unpin
2020-02-27 09:37:05 +09:00
Maksym Vorobiov
2e2ea7ab80
remove extra whitespaces and Unpins
2020-02-27 09:37:05 +09:00
Maksym Vorobiov
9d04b250f9
This is a squashed commit:
...
- Convert MessageBody to accept Pin in poll_next
- add CHANGES and increase versions aligned to semver
- update crates to accomodate MessageBody Pin change
- fix tests and dependencies
2020-02-27 09:37:05 +09:00
Aaron Hill
71c4bd1b30
Remove uses of Pin::new_unchecked in h1 Dispatcher ( #1374 )
...
This removes the last uses of unsafe `Pin` functions in actix-web.
This PR adds a `Pin<Box<_>>` wrapper to `DispatcherState::Upgrade`,
`State::ExpectCall`, and `State::ServiceCall`.
The previous uses of the futures `State::ExpectCall` and `State::ServiceCall`
were Undefined Behavior - a future was obtained from `self.expect.call`
or `self.service.call`, pinned on the stack, and then immediately
returned from `handle_request`. The only alternative to using `Box::pin`
would be to refactor `handle_request` to write the futures directly into
their final location, or avoid polling them before they are returned.
The previous use of `DispatcherState::Upgrade` doesn't seem to be
unsound. However, having data pinned inside an enum that we
`std::mem::replace` would require some careful `unsafe` code to ensure
that we never call `std::mem::replace` when the active variant contains
pinned data. By using `Box::pin`, we any possibility of future
refactoring accidentally introducing undefined behavior.
Co-authored-by: Yuki Okushi <huyuumi.dev@gmail.com>
2020-02-26 08:21:05 +09:00
Nikolay Kim
e66312b664
add extra constraints
2020-01-10 11:36:59 +06:00
Nikolay Kim
1d12ba9d5f
Replace brotli with brotli2 #1224
2019-12-20 13:50:07 +06:00
Nikolay Kim
8c54054844
Use .advance() intead of .split_to()
2019-12-19 09:56:14 +06:00
Nikolay Kim
1732ae8c79
fix Bodyencoding trait usage
2019-12-18 09:30:14 +06:00
Rajasekharan Vengalil
3b860ebdc7
Fix poll_ready call for WebSockets upgrade ( #1219 )
...
* Fix poll_ready call for WebSockets upgrade
* Poll upgrade service from H1ServiceHandler too
2019-12-17 13:34:25 +06:00
Nikolay Kim
3d64d565d9
fix warnings
2019-12-13 11:46:02 +06:00
Nikolay Kim
c1deaaeb2f
cleanup imports
2019-12-13 11:24:57 +06:00
Nikolay Kim
b81417c2fa
fix warnings
2019-12-13 10:59:02 +06:00
Nikolay Kim
fa07415721
Replace flate2-xxx features with compress
2019-12-12 15:08:08 +06:00
Nikolay Kim
5132257b0d
Fix buffer remaining capacity calcualtion
2019-12-09 21:55:22 +06:00
Nikolay Kim
0c1f5f9edc
Check Upgrade service readiness before calling it
2019-12-09 17:40:15 +06:00
Nikolay Kim
6c9f9fff73
clippy warnings
2019-12-08 00:46:51 +06:00
Nikolay Kim
205a964d8f
upgrade to tokio 0.2
2019-12-05 23:35:43 +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
4dc31aac93
use actix_rt::test for test setup
2019-11-26 11:25:50 +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
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
f7f410d033
fix test order dep
2019-11-06 11:20:47 -08:00
Yuki Okushi
c1f99e0775
Remove mem::uninitialized()
( #1090 )
2019-09-16 07:52:23 +09:00
Nikolay Kim
60b7aebd0a
fmt & clippy
2019-09-12 21:52:46 +06:00
Dmitry Pypin
8873e9b39e
Added FrozenClientRequest for easier retrying HTTP calls ( #1064 )
...
* Initial commit
* Added extra_headers
* Added freeze() method to ClientRequest which produces a 'read-only' copy of a request suitable for retrying the send operation
* Additional methods for FrozenClientRequest
* Fix
* Increased crates versions
* Fixed a unit test. Added one more unit test.
* Added RequestHeaderWrapper
* Small fixes
* Renamed RequestHeadWrapper->RequestHeadType
* Updated CHANGES.md files
* Small fix
* Small changes
* Removed *_extra methods from Connection trait
* Added FrozenSendBuilder
* Added FrozenSendBuilder
* Minor fix
* Replaced impl Future with concrete Future implementation
* Small renaming
* Renamed Send->SendBody
2019-09-10 10:29:32 +06:00
Nikolay Kim
63ddd30ee4
on_connect result isnt added to request extensions for http2 requests #1009
2019-09-01 13:15:02 +06:00
Nikolay Kim
2a2d7f5768
nightly clippy warnings
2019-07-17 15:53:51 +06:00
Nikolay Kim
baaa7b3fbb
Replace ClonableService with local copy
2019-07-17 13:55:44 +06:00
Nikolay Kim
d286ccb4f5
Add on-connect callback #946
2019-06-28 14:34:26 +06:00
Nikolay Kim
a548b69679
fmt
2019-06-05 08:43:13 +06:00
Nicolas Gotchac
a614be7cb5
Don't DISCONNECT from stream when reader is empty ( #870 )
...
* Don't DISCONNECT from stream when reader is empty
* Fix chunked transfer: poll_request before closing stream + Test
2019-05-29 20:37:42 +04:00
Nikolay Kim
7f12b754e9
Handle socket read disconnect
2019-05-25 03:07:40 -07:00
Nikolay Kim
f8af3b86e5
export set_date
2019-05-14 08:48:11 -07:00
Nikolay Kim
df08baf67f
update actix-net dependencies
2019-05-12 08:34:51 -07:00
Nikolay Kim
f27beab016
fix case for transfer-encoding header name
2019-05-02 09:30:00 -07:00
Nikolay Kim
f429d3319f
Read until eof for http/1.0 responses #771
2019-04-24 11:57:40 -07:00
Nikolay Kim
2e19f572ee
add tests for camel case headers rendering
2019-04-24 11:27:57 -07:00
Peter Ding
64f603b076
Support to set header names of ClientRequest
as Camel-Case ( #713 )
...
* Support to set header names of `ClientRequest` as Camel-Case
This is the case for supporting to request for servers which don't
perfectly implement the `RFC 7230`. It is important for an app
which uses `ClientRequest` as core part.
* Add field `upper_camel_case_headers` to `ClientRequest`.
* Add function `set_upper_camel_case_headers` to `ClientRequest`
and `ClientRequestBuilder` to set field `upper_camel_case_headers`.
* Add trait `client::writer::UpperCamelCaseHeader` for
`http::header::HeaderName`, let it can be converted to Camel-Case
then writed to buffer.
* Add test `test_client::test_upper_camel_case_headers`.
* Support upper Camel-Case headers
* [actix-http] Add field `upper_camel_case_headers` for `RequestHead`
* [actix-http] Add code for `MessageType` to support upper camel case
* [awc] Add functions for `ClientRequest` to set upper camel case
* Use `Flags::CAMEL_CASE` for upper camel case of headers
2019-04-24 10:48:49 -07:00
Nikolay Kim
a116c4c2c7
Expose peer addr via Request::peer_addr() and RequestHead::peer_addr
2019-04-16 09:54:02 -07:00
Nikolay Kim
d86567fbdc
revert SendResponse::Error type
2019-04-11 14:18:58 -07:00