mirror of https://github.com/fafhrd91/actix-web
relax ConnectorConfig default timeout
This commit is contained in:
parent
5e2d776a8f
commit
7ab432e41c
|
@ -17,6 +17,7 @@
|
||||||
* Remove `HttpResponseBuilder::json2()` and make `HttpResponseBuilder::json()` take a value by
|
* Remove `HttpResponseBuilder::json2()` and make `HttpResponseBuilder::json()` take a value by
|
||||||
reference. [#1903]
|
reference. [#1903]
|
||||||
* `client::error::ConnectError` Resolver variant contains `Box<dyn std::error::Error>` type [#1905]
|
* `client::error::ConnectError` Resolver variant contains `Box<dyn std::error::Error>` type [#1905]
|
||||||
|
* `client::ConnectorConfig` default timeout changed to 5 seconds. [#1905]
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
* `ResponseBuilder::set`; use `ResponseBuilder::insert_header`. [#1869]
|
* `ResponseBuilder::set`; use `ResponseBuilder::insert_header`. [#1869]
|
||||||
|
|
|
@ -18,7 +18,7 @@ pub(crate) struct ConnectorConfig {
|
||||||
impl Default for ConnectorConfig {
|
impl Default for ConnectorConfig {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self {
|
Self {
|
||||||
timeout: Duration::from_secs(1),
|
timeout: Duration::from_secs(5),
|
||||||
conn_lifetime: Duration::from_secs(75),
|
conn_lifetime: Duration::from_secs(75),
|
||||||
conn_keep_alive: Duration::from_secs(15),
|
conn_keep_alive: Duration::from_secs(15),
|
||||||
disconnect_timeout: Some(Duration::from_millis(3000)),
|
disconnect_timeout: Some(Duration::from_millis(3000)),
|
||||||
|
|
|
@ -100,9 +100,9 @@ impl Connector<(), ()> {
|
||||||
fn build_ssl(protocols: Vec<Vec<u8>>) -> SslConnector {
|
fn build_ssl(protocols: Vec<Vec<u8>>) -> SslConnector {
|
||||||
let mut config = ClientConfig::new();
|
let mut config = ClientConfig::new();
|
||||||
config.set_protocols(&protocols);
|
config.set_protocols(&protocols);
|
||||||
config
|
config.root_store.add_server_trust_anchors(
|
||||||
.root_store
|
&actix_tls::connect::ssl::rustls::TLS_SERVER_ROOTS,
|
||||||
.add_server_trust_anchors(&actix_tls::accept::rustls::TLS_SERVER_ROOTS);
|
);
|
||||||
SslConnector::Rustls(Arc::new(config))
|
SslConnector::Rustls(Arc::new(config))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
* `ClientRequest::insert_header` method which allows using typed headers. [#1869]
|
* `ClientRequest::insert_header` method which allows using typed headers. [#1869]
|
||||||
* `ClientRequest::append_header` method which allows using typed headers. [#1869]
|
* `ClientRequest::append_header` method which allows using typed headers. [#1869]
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
* Relax default timeout for `Connector` to 5 seconds(original 1 second). [#1905]
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
* `ClientRequest::set`; use `ClientRequest::insert_header`. [#1869]
|
* `ClientRequest::set`; use `ClientRequest::insert_header`. [#1869]
|
||||||
* `ClientRequest::set_header`; use `ClientRequest::insert_header`. [#1869]
|
* `ClientRequest::set_header`; use `ClientRequest::insert_header`. [#1869]
|
||||||
|
@ -12,6 +15,7 @@
|
||||||
* `ClientRequest::header`; use `ClientRequest::append_header`. [#1869]
|
* `ClientRequest::header`; use `ClientRequest::append_header`. [#1869]
|
||||||
|
|
||||||
[#1869]: https://github.com/actix/actix-web/pull/1869
|
[#1869]: https://github.com/actix/actix-web/pull/1869
|
||||||
|
[#1905]: https://github.com/actix/actix-web/pull/1905
|
||||||
|
|
||||||
|
|
||||||
## 3.0.0-beta.1 - 2021-01-07
|
## 3.0.0-beta.1 - 2021-01-07
|
||||||
|
|
Loading…
Reference in New Issue