Commit Graph

48 Commits

Author SHA1 Message Date
Rob Ede 538c1bea34
chore: disallow e bindings 2024-08-10 05:15:49 +01:00
Rob Ede 6f0a6bd1bb
address clippy lints
For intrepid commit message readers:
The choice to add allows for the inlined format args lint instead of actually
inlining them is not very clear because our actual real world MSRV is not clear.
We currently claim 1.60 is our MSRV but this is mainly due to dependencies. I'm
fairly sure that we could support < 1.58 if those deps are outdated in a users
lockfile. We'll remove these allows again at some point soon.
2023-01-01 20:56:34 +00:00
Santiago 0fa4d999d9
fix(actix-http): encode correctly camel case header with n+2 hyphens (#2683)
Co-authored-by: Rob Ede <robjtede@icloud.com>
2022-03-05 22:24:21 +00:00
Rob Ede 1d1a65282f
RC refinements (#2625) 2022-02-04 20:37:33 +00:00
Rob Ede 3200de3f34
fix request head timeout (#2611) 2022-01-31 17:30:34 +00:00
Rob Ede 50894e392e
document new body map types 2022-01-23 23:26:35 +00:00
Rob Ede 141790b200
use camel case in special headers
fixes #2595
2022-01-21 20:15:43 +00:00
Rob Ede 7b8a392ef5
allow camel case response headers (#2587) 2022-01-16 03:16:26 +00:00
Rob Ede 17f636a183
split request and response modules (#2530) 2021-12-19 17:05:27 +00:00
Rob Ede 406f694095
standardize rustfmt max_width 2021-12-08 06:01:11 +00:00
Rob Ede 2d053b7036
remove `actix_http::http` module (#2488) 2021-12-05 14:37:20 +00:00
Rob Ede c4b20df56a
convert all remaining IETF RFC links to new format 2021-12-02 03:45:04 +00:00
Rob Ede 194a691537
files: 304 Not Modified responses omit Content-Length header (#2453) 2021-11-19 14:04:12 +00:00
Rob Ede 4df1cd78b7
simplify `AnyBody` and `BodySize` (#2446) 2021-11-16 09:21:10 +00:00
Rob Ede 591abc37c3
add test runtime macro (#2409) 2021-10-19 17:30:32 +01:00
Thales a0c0bff944
Don't create a slice to potential uninit data on h1 encoder (#2364)
Co-authored-by: Rob Ede <robjtede@icloud.com>
2021-08-13 18:41:19 +01:00
Rob Ede e965d8298f
HRS security fixes (#2363) 2021-08-12 20:18:09 +01:00
Rob Ede 532f7b9923
refined error model (#2253) 2021-06-17 17:57:58 +01:00
Rob Ede 900c9e270e
remove responsebody indirection from response (#2201) 2021-05-09 20:12:48 +01:00
Rob Ede ca69b6577e
use iota for more content-length insertions (#2050) 2021-03-07 19:29:02 +00:00
Rob Ede 3279070f9f
optional cookies features (#1981) 2021-02-13 15:08:43 +00:00
fakeshadow 366c032c36
refactor DateService (#1983) 2021-02-12 21:52:58 +00:00
Rob Ede 949d14ae2b
clean up header map (#1964) 2021-02-09 22:59:17 +00:00
fakeshadow 4c243cbf89
simplify methods of awc::connect::Connect trait (#1941) 2021-02-07 18:56:39 +00:00
fakeshadow d34a8689e5
Refactor h1 encoder (#1900) 2021-01-12 14:38:53 +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
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 9a9d4b182e
document all remaining unsafe usages (#1642)
adds some debug assertions where appropriate
2020-09-03 10:00:24 +01:00
Rob Ede 7e8ea44d5c
remove needless BodySize::Sized64 variant 2020-05-18 00:42:51 +01: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 205a964d8f upgrade to tokio 0.2 2019-12-05 23:35:43 +06:00
Nikolay Kim f7f410d033 fix test order dep 2019-11-06 11:20:47 -08: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 f27beab016 fix case for transfer-encoding header name 2019-05-02 09:30:00 -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 ec09d6fbe6 optimize encode headers and body split 2019-04-07 10:03:38 -07:00
Nikolay Kim 748289f0ff use custom headers map; more optimizations 2019-04-06 15:02:02 -07:00
Nikolay Kim 3872d3ba5a refactor h1 dispatcher 2019-04-06 08:12:58 -07:00
Nikolay Kim 3edc515bac refactor RequestHead/ResponseHead 2019-03-27 10:38:01 -07:00
Nikolay Kim faa3ea8e5b rename BodyLength to BodySize 2019-03-27 09:24:55 -07:00
Nikolay Kim c7ad677804 Merge actix-http project 2019-03-26 11:54:35 -07:00