Commit Graph

167 Commits

Author SHA1 Message Date
messense
329e1f4ada Switch to rustls-webpki 2023-05-12 20:25:29 +02:00
Jacob Hoffman-Andrews
2e7bcf255a Update rustls to 0.21 (#601)
This introduces support for IP address certificates!
2023-03-31 14:29:53 -07:00
Jacob Hoffman-Andrews
ce4b9f28e2 lock serde_json below 1.0.94 (#603)
This avoids a bug in more recent version that prevents us from
downcasting errors to see if they are TimedOut errors.
2023-03-30 11:00:13 -07:00
Kade Robertson
7dcd60cbaf refactor: rename feature to http-interop 2023-03-15 03:54:13 +01:00
Kade Robertson
f395a726e3 feat: bidrectional http response conversion 2023-03-15 03:54:13 +01:00
Martin Algesten
abda74c4d8 Upgrade deps 2023-01-31 08:52:47 +01:00
Jacob Hoffman-Andrews
498e19943f Allow non-empty connection pools to be dropped (#583)
This breaks a reference cycle between PoolReturner and Agent that was
causing Agents (and their contained ConnectionPool) to never be dropped
so long as there was any stream in the ConnectionPool. This cause
sockets to leak over time, particularly when the convenience functions
ureq::get(), ureq::post(), etc were used, since those functions create
a new Agent each time.
2023-01-16 08:33:56 -08:00
Jacob Hoffman-Andrews
032bfb4b27 gzip: examine Content-Length header before removing (#578)
Fixes #575.
2023-01-02 20:02:37 -08:00
Jacob Hoffman-Andrews
78ec3a4d75 Update CHANGELOG for 2.6.0 (#572) 2022-12-30 21:56:23 -08:00
Jacob Hoffman-Andrews
6bef9daa8e Switch ureq to used forked chunked_transfer. 2022-12-09 17:03:35 +01:00
Martin Algesten
8e8b1abd53 Upgrade deps 2022-11-26 11:46:00 +01:00
Martin Algesten
b0796c18f3 Make build work (#546)
The mbedtls example has caused problem in the main build a number of
times. By making it a standalone `cargo new --bin`, we can keep it in
the source tree as a good example but avoid having it break the main
build.

Also, fix some clippy lints.
2022-09-29 08:29:32 -07:00
Martin Algesten
84d58587c0 Bump version to 2.5.0 2022-07-10 11:30:40 +02:00
Jacob Hoffman-Andrews
8a32cae507 Remove sync_wrapper dep in favor of Mutex (#514)
We unwrap the stream exactly once per response, and we know that case
will be uncontended for the same reason `SyncWrapper` works:
`into_reader()` takes `self`, so it must have exclusive ownership.
Uncontended mutexes are extremely cheap. This saves us a dependency
at a trivial performance cost.
2022-05-09 10:32:23 -07:00
dependabot[bot]
e4f064d4f2 Update rustls-pemfile requirement from 0.3 to 1.0
Updates the requirements on [rustls-pemfile](https://github.com/rustls/pemfile) to permit the latest version.
- [Release notes](https://github.com/rustls/pemfile/releases)
- [Commits](https://github.com/rustls/pemfile/compare/v/0.3.0...v/1.0.0)

---
updated-dependencies:
- dependency-name: rustls-pemfile
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-22 19:26:47 +02:00
Martin Algesten
21238ef2e0 Provide example of more in-depth TLS config
Close #480
2022-04-12 20:43:27 +02:00
Martin Algesten
e225532966 Update cookie dep to 0.16 2022-04-12 20:33:09 +02:00
dependabot[bot]
f549184d7f Update rustls-pemfile requirement from 0.2 to 0.3
Updates the requirements on [rustls-pemfile](https://github.com/rustls/pemfile) to permit the latest version.
- [Release notes](https://github.com/rustls/pemfile/releases)
- [Commits](https://github.com/rustls/pemfile/compare/v/0.2.0...v/0.3.0)

---
updated-dependencies:
- dependency-name: rustls-pemfile
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-10 17:25:50 +01:00
Martin Algesten
5dbaa9a256 Rename example mbedtls-req -> mbedtls 2022-01-31 09:45:57 +01:00
Michael Richardson
034981f535 added example of using mbedtls as a TLS provider
make authentication mode a parameter, default to Required
2022-01-31 09:33:38 +01:00
Malloc Voidstar
ff0e91d33e Fix rustls version spec
">=0.20.1" doesn't have an upper bound and will accept 0.21 (and higher) once they're available.
"0.20.1" means "^0.20.1", which means ">=0.20.1, <0.21".

https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#caret-requirements
2022-01-31 09:16:39 +01:00
Martin Algesten
2c29cc230c Remove Sync requirement of ReadWrite trait
3rd party TLS connections are currently required to provide a Sync
guarantee. Since ureq will only ever use the connection on a single
thread, this is not necessary.

The reason we end up with this bound is because we want Response and
Error to be Sync, in which case Rust's automatic inferral of Sync
fails.

This change "masks" the Stream in a wrapper making it Sync.

Close #474
2022-01-30 21:50:11 +01:00
Martin Algesten
007ce44ea7 Bump version to 2.4.0 2021-12-23 08:38:00 +01:00
Jacob Hoffman-Andrews
2563df4f62 Bump rustls to >=0.20.1
Without this we get a build error because we depend on an impl of Error
on InvalidDnsNameError.
2021-12-20 02:39:38 +01:00
Martin Algesten
738cb84aec Enable 'gzip' by default 2021-12-20 02:38:18 +01:00
Malloc Voidstar
873e6066f3 Add support for gzip and brotli
Automatically sends the Accept-Encoding header on requests.

Not runtime-configurable, only with Cargo features.
2021-12-19 14:01:56 +01:00
Jacob Hoffman-Andrews
56276c3742 Add support for alternate TLs implementations. 2021-12-17 17:47:30 +01:00
Malloc Voidstar
1c1dfaa691 Bump rustls to 0.20.1; add src to rustls error (#438) 2021-12-17 00:32:00 -08:00
Jacob Hoffman-Andrews
94a8040706 Prepare for release 2.3.1 (#437) 2021-11-14 09:55:55 -08:00
dependabot[bot]
418c0fafd5 Update rustls-native-certs requirement from 0.5 to 0.6 (#432)
Updates the requirements on [rustls-native-certs](https://github.com/ctz/rustls-native-certs) to permit the latest version.
- [Release notes](https://github.com/ctz/rustls-native-certs/releases)
- [Commits](https://github.com/ctz/rustls-native-certs/compare/v/0.5.0...v/0.6.0)

---
updated-dependencies:
- dependency-name: rustls-native-certs
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-12 22:06:40 -08:00
Jacob Hoffman-Andrews
9587a6cc8e Update CHANGELOG and Cargo.toml for 2.3.0 (#431) 2021-10-21 11:39:43 -07:00
Jacob Hoffman-Andrews
f22e67be4c Fix agent test. 2021-10-21 07:38:59 +02:00
Jacob Hoffman-Andrews
848eb7be38 Match versions of rustls 2021-10-21 07:38:59 +02:00
Jacob Hoffman-Andrews
5fa912c4d3 Update to rustls 0.20, webpki 0.22 2021-10-21 07:38:59 +02:00
Martin Algesten
a1d7009e24 2.2.0 2021-08-23 21:32:42 +02:00
Martin Algesten
551f4289fb Update all dependencies
webpki and webpki roots are not compatible with current rustls,
so they are held back.:wq
2021-08-23 21:21:39 +02:00
Keijia
e198a5169b bump socks to 0.3.3 2021-08-23 20:46:44 +02:00
Jacob Hoffman-Andrews
c0d7157ae7 Update CHANGELOG and Cargo.toml for 2.1.1 (#376) 2021-04-26 11:00:53 -07:00
Malloc Voidstar
2f1f9c45aa Fix typo, disable default features of cookie 2021-04-10 16:28:54 +02:00
Martin Algesten
e70fdcc797 2.1.0 2021-03-26 07:45:11 +01:00
Martin Algesten
c5c40cf138 Stop percent encoding cookies 2021-03-24 20:09:27 +01:00
Jacob Hoffman-Andrews
9ec4e7192a Add -k option to cureq example (#342)
By analogy with curl, this turns off certificate verification. Requires
enabling the "dangerous_configuration" feature in the rustls dependency.
2021-03-23 17:00:32 -07:00
Martin Algesten
9a9dd4ee6c Upgrade cookie to 0.15 and cookie_store to 0.13.0
cookie_store default features pulls in reqwest, so we stop that
by specifying the exact features wanted.
2021-03-14 19:00:28 +01:00
Jacob Hoffman-Andrews
6f86ee7f93 Add example "cureq". (#330)
Contrary to smoke-test, this takes full URLs on the commandline and
prints their contents to stdout. This makes it easier to test behavior
with specific URLs. I hope to later add flags for various behaviors like
printing headers, following redirects, enabling / disabling cookies,
and verbose output.

Also add a useful debug line when receiving a cookie header.
2021-02-21 14:26:12 -08:00
Martin Algesten
c833acfe5c 2.0.2 2021-02-21 09:30:57 +01:00
Jacob Hoffman-Andrews
96985956aa Bump to 2.0.1.
Brings in a fix to 308 redirects.
2021-01-03 17:52:38 -08:00
Jacob Hoffman-Andrews
6390558415 Update CHANGELOG for 2.0.0. 2021-01-03 21:07:09 +01:00
Jacob Hoffman-Andrews
234eb5572f Update CHANGELOG and Cargo.toml for 2.0.0-rc4 (#279) 2020-12-19 12:11:38 -08:00
Jacob Hoffman-Andrews
1448969dd7 Increment version to 2.0.0-rc3 2020-12-12 09:27:50 -08:00
messense
df1f4bd0e1 Replace unmaintained encoding crate with encoding_rs 2020-11-29 19:38:39 +01:00