Commit Graph

898 Commits

Author SHA1 Message Date
4JX
b41401f4a8 Flake 2023-01-05 01:40:32 +01:00
4JX
5736cf293e Update Cargo.toml 2023-01-05 01:29:46 +01:00
4JX
a99f023e0b Chrome v106 2023-01-05 01:29:46 +01:00
4JX
e979166879 Chrome v105 2023-01-05 01:29:46 +01:00
4JX
b22267618c Add impersonation capabilites
Update lib.rs
2023-01-05 01:29:46 +01:00
link2xt
c2a1870a3e Documentation fix: it's TCP_NODELAY, not SO_NODELAY (#1710) 2023-01-03 14:02:13 -05:00
Valentin Bersier
b16ea79e28 Add public interface to Multipart's Part headers (#1687)
* feat(async_impl): set custom headers on multipart Part

* feat(blocking): set custom headers on multipart

* test(multipart): use new method to add custom headers

* fix: missing import

* refactor(multipart): use concrete type for headers setter arg
2023-01-03 09:54:23 -05:00
Andreas Sahlbach
cdbf84feb1 Adds Proxy::no_proxy(url) (#1694)
Adds the ability to add a NoProxy List to a Proxy via API, utilising the already existing functionality.
Makes NoProxy public and replaces NoProxy::new() with NoProxy::from_env() and NoProxy::from_string(). Adds a Proxy::no_proxy() method.

Closes #1690
2022-12-20 16:44:40 -05:00
BlackDex
9566194aa1 Remove proc-macro-hack crate
The `proc-macro-hack` crate isn't needed anymore.
Cookie has been updated to `0.16` for a while now, and no other crates
depend on it anymore, so no need for reqwest to have this either.
2022-12-20 13:38:34 -05:00
BlackDex
2640892de7 Update/Fix CI workflow
- Fixed cargo fmt
- Updated MSRV to v1.57.0, which is needed for `base64` v0.20
- Updated all actions to the latest versions. (Solves Annotation warnings)
- Replaced actions-rs with dtolnay actions or simple run's.
  actions-rs is not supported anymore, and also causes warnings.
- Use Ubuntu 20.04 for `linux / nightly`.
  The reason is that Ubuntu 22.04 uses OpenSSL v3, this currently is not compatible with hyper-tls it looks like. I also tried to update the `openssl-sys` crate but that doesn't solve the compile issue. Using a Ubuntu version that still has OpenSSL v1.1.1 resolves the CI for now.
2022-12-20 11:29:32 -05:00
austaras
e8a733a26e Update base64 to 0.20 2022-12-17 07:27:26 -05:00
Jiahao XU
5656fb8616 Optimize decoder::Inner: Box all variants except PlainText
since these variants are just way too large:
 - Variant `Brotli` is 2752b
 - Variant `Gzip` is 320b
 - Variant `Deflate` is 240b
 - Variant `Pending` is 88b

while variant `PlainText` is just 32b.

Having a large variant would make `Response` and
return type of `Response::bytes_stream` to be too large, which in turns
adds extra copy.

It would also means the generated async functions all have to be large,
and since rust MIR/LLVM isn't good at optimizing out stack copies for
async functions, it means more copies it going to occur for the
generated futures.

Also, rust MIR optimizer cannot inline generated futures, so any async
fns that passes these types around would have to be huge.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-11-17 18:52:16 -05:00
Sean McArthur
3c39260cf7 v0.11.13 2022-11-16 10:44:55 -05:00
Kian-Meng Ang
81fc85a689 docs: fix some typos (#1562)
Co-authored-by: Sean McArthur <sean@seanmonstar.com>
2022-11-15 17:43:56 -05:00
Alvenix
e302f75b60 Add option to configure TLS server name indication (SNI) (#1669) 2022-11-09 09:49:58 -05:00
Thomas Smith
f11e958433 Add support for custom DNS resolution (#1653)
Closes #1125
2022-11-02 09:27:07 -04:00
Andrei Grazhdankov
231b18f835 native-tls: add Identiy::from_pkcs8_pem (#1655)
Add new optional fn from_pkcs8_pem for easy load client certificate (*.crt and *.key) for feature native-tls.
2022-10-19 10:48:10 -04:00
anhcuky
110c3aee33 Fix redirect limited(0) should not follow redirects (#1645)
Closes #1639
2022-10-10 11:46:31 -04:00
Jiahao XU
4c377661bb Bump dep trust-dns-resolver to v0.22 (#1647)
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-10-09 12:18:55 +00:00
Sean McArthur
a0a7db0113 v0.11.12 2022-09-20 11:14:51 -07:00
lpraneis
ae2d521664 Add ability to specify multiple IP addresses for resolver overrides (#1622)
This change allows the `ClientBuilder::resolve_to_addrs` method to accept a
slice of `SocketAddr`s for overriding resolution for a single domain.
Allowing multiple IPs more accurately reflects behavior of `getaddrinfo`
and allows users to rely on hyper's happy eyeballs algorithm to connect
to a host that can accept traffic on IPv4 and IPv6.
2022-09-19 13:53:36 -07:00
Luqman Aden
6ceb23958c Export Upgraded type. (#1618) 2022-09-07 23:37:21 +00:00
Luqman Aden
61474f422c Add HTTP Upgrade support to Response. (#1376) 2022-07-28 13:18:18 -07:00
Vidhan Bhatt
e9ba0a9dc7 docs: fix broken doc comment example. (#1584) 2022-07-19 07:10:30 -07:00
Miguel Guarniz
3b2eecce6e Remove debug log of status and URL (#1583)
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-07-18 17:37:12 -07:00
Kaede Hoshikawa
74e70627be Migrate to once_cell. (#1565) 2022-07-18 16:16:59 -07:00
Sean McArthur
b72a385ae7 Bump MSRV to 1.56 (#1582) 2022-07-18 15:48:40 -07:00
Sean McArthur
5397d2cf8e v0.11.11 2022-06-13 13:52:17 -07:00
Marcus Griep
7a11d397eb feat: enable client to be a service without ownership (#1556) 2022-06-13 13:45:30 -07:00
Sean McArthur
c4603b0a5d Disable dependabot wasm alerts 2022-06-08 10:46:17 -07:00
Sean McArthur
d536ce261c Fix RequestBuilder to send explicitly sensitive headers
Closes #1549
2022-05-31 14:10:19 -05:00
Jens Reimann
28840afd46 [#1095]: Implement basic_auth for WASM
Signed-off-by: Jens Reimann <jreimann@redhat.com>
2022-05-30 09:32:34 -05:00
hson
c4d5094522 Update path and toolchain up to date 2022-05-17 11:30:11 -05:00
hson
a80c863a42 Bump async-compression 2022-05-17 11:30:11 -05:00
hson
48a88fee7a fix style and format 2022-05-17 11:30:11 -05:00
hson
0b9b499356 Expose hyper HTTP2 keep-alive config. 2022-05-17 11:30:11 -05:00
Brian Cook
2a6e012009 Fix Proxy URL parse error handling. (#1539)
* Check for schema during URL parse error handling.  Lots of unit tests.
* Introduce BadScheme; an error source.  Change schema to scheme.  Use BadScheme instead of the error text to determine that a scheme is not present.
2022-05-05 16:23:36 -07:00
cui fliter
6ca5f3e50c docs: fix some typos (#1531)
Signed-off-by: cuishuang <imcusg@gmail.com>
2022-04-25 10:00:01 -07:00
Mathspy
d24a5286c7 Implement tower Service for Client (#1420)
* Add tower-service

* Implement tower Service for Client
2022-04-20 16:14:35 -07:00
eyalsatori
5d8bf830cb Enable ClientBuilder to be configure with http1_allow_obsolete_multiline_headers_in_responses (#1521) (#1523) 2022-04-19 08:53:08 -07:00
Flavio Castelli
2e5debe248 [rustls] identity: handle elliptic curve private keys (#1526)
This commit improves the user experience of the users leveraging rustls.

When building the identity to use for requests, it's now possible to use
also private keys using Elliptic Curve that are encoded with SEC1
standard.

This is the default encoding used by openssl when EC keys are created.
Prior to this commit users had to convert those keys from the SEC1
encoding to the PKCS 8 one, which is something not trivial.

This feature has been recently added to rustls-pemfile crate.

Signed-off-by: Flavio Castelli <fcastelli@suse.com>
2022-04-15 11:55:11 -07:00
MisileLaboratory
41425edfe3 Update license copyright. (#1527) 2022-04-15 10:31:59 -07:00
Paolo Barbolini
9bd4e90ec3 Bump rustls-pemfile to v1 (#1525) 2022-04-14 15:12:10 -07:00
Joel Natividad
fe0d9688f5 Bump cookie to 0.16; tokio-util to 0.7; trust-dns-resolver to 0.21 (#1509) 2022-03-31 10:08:42 -07:00
Sean McArthur
798df70fb0 v0.11.10 2022-03-14 11:39:43 -07:00
Mohamed Daahir
6dbac11d39 expose http::Extensions in Response (#1476) 2022-03-14 11:21:57 -07:00
wspsxing
ee57777d42 fix basic-auth for access http over https's proxy (#1491) 2022-03-14 11:08:04 -07:00
ComplexSpaces
b4f716bd3a Update winreg to 0.10 (#1496) 2022-03-10 20:04:16 -08:00
Nihaal Sangha
f889a7b6a7 Improve RequestBuilder.form() docs (#1490) 2022-03-03 15:00:12 -08:00
Sean McArthur
0170947fb4 Bump MSRV to 1.49 (#1484) 2022-02-25 13:46:13 -08:00