Commit Graph

898 Commits

Author SHA1 Message Date
dependabot[bot]
4a8998241a Bump lodash from 4.17.15 to 4.17.19 in /examples/wasm_header (#975)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-24 07:06:32 -07:00
dependabot[bot]
9df2bc6e61 Bump lodash from 4.17.15 to 4.17.19 in /examples/wasm_github_fetch (#974)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-24 07:06:18 -07:00
Michal 'vorner' Vaner
69288606bc Allow conversion from async client builder to blocking one (#978)
The builders have mostly the same options and the blocking one is just a
wrapper around the async one. The possible conversion makes it easier to
support creating both kinds from configuration file, reducing some code
duplication.
2020-07-20 10:27:14 -07:00
Enno Boland
a800202384 Add multipart for WASM (#966) 2020-07-08 13:10:23 -07:00
Enno Boland
af9fc5c9d8 Implement Request::bearer_auth for wasm32 2020-07-06 15:00:54 -07:00
Alex Gaynor
1a2c10256a deps(chore): update to the latest rustls (#969) 2020-07-06 09:01:46 -07:00
Fabian Franz
7fd6b44cde Issue #956: Take the cookie store write lock only when necessary (#960) 2020-06-26 12:27:23 -07:00
Paolo Barbolini
f2e8dd2477 Update cookie crates (#946) 2020-06-24 09:04:21 -07:00
David Pedersen
1c680005c2 Add blocking::Response::headers_mut (#958) 2020-06-24 07:19:15 -07:00
alianse777
71386d8734 Implement form() and query() for RequestBuilder [WASM] (#947) 2020-06-15 07:28:51 -07:00
Tom Hacohen
668e89b78a Error: add functions to check more error types. (#945)
There are functions to check if the error is from an array of different
reasons, but there were no functions to check if the failure was due to
the rest of the possible error reasons. This commit adds though.

Fixes #942
2020-06-13 07:52:02 -07:00
Taylor Thomas
6914091582 feat(proxy): Adds NO_PROXY environment variable support (#877)
* feat(proxy): Adds NO_PROXY environment variable support

Adds support for loading from the `NO_PROXY` or `no_proxy` environment
variables. This should make reqwest support the system proxy settings.
Please note that I brought in one additional dependency in order to
handle CIDR blocks in the no proxy settings.

Closes #705
2020-06-08 15:32:56 -07:00
dependabot[bot]
da899e27e1 Bump websocket-extensions from 0.1.3 to 0.1.4 in /examples/wasm_header (#940)
Bumps [websocket-extensions](https://github.com/faye/websocket-extensions-node) from 0.1.3 to 0.1.4.
- [Release notes](https://github.com/faye/websocket-extensions-node/releases)
- [Changelog](https://github.com/faye/websocket-extensions-node/blob/master/CHANGELOG.md)
- [Commits](https://github.com/faye/websocket-extensions-node/compare/0.1.3...0.1.4)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-06-08 13:22:44 -07:00
dependabot[bot]
ec2f15ffdb Bump websocket-extensions in /examples/wasm_github_fetch (#939)
Bumps [websocket-extensions](https://github.com/faye/websocket-extensions-node) from 0.1.3 to 0.1.4.
- [Release notes](https://github.com/faye/websocket-extensions-node/releases)
- [Changelog](https://github.com/faye/websocket-extensions-node/blob/master/CHANGELOG.md)
- [Commits](https://github.com/faye/websocket-extensions-node/compare/0.1.3...0.1.4)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-06-08 13:22:23 -07:00
Sean McArthur
bcb35e9498 v0.10.6 2020-05-29 10:49:54 -07:00
Jacob Hoffman-Andrews
eef504631b Reject non-http, non-https URLs. (#921)
Normally hyper is in charge of rejecting non-http URLs, but because
reqwest supports both http and https URLs, it calls enforce_http(false),
disabling hyper's checks.

This adds back a check in reqwest itself, plus a test.

There may still need to be an additional check in connect.rs.
2020-05-29 10:29:40 -07:00
Bryan Burgers
fd253cf1ab Remove webpki-tokio from hyper-rustls (#935)
`reqwest` doesn't actually care how hyper-rustls gets its root certs. By
not specifying any feature for hyper-rustls, `reqwest` is able to work
with `rusoto_core` and others better.
2020-05-29 09:13:03 -07:00
Sean McArthur
6c7190bb4f v0.10.5 2020-05-28 21:23:40 +00:00
Damien Cuenot
248a9765b3 Backport Sentivite headers to blocking implementation (#931) 2020-05-28 14:21:59 -07:00
Damien Cuenot
d879d6f6c2 Define authorization headers as sensitive header (#916) 2020-05-22 14:39:55 -07:00
Patrick Lühne
ecf1df572c Rename option to “pool_max_idle_per_host” (#917)
reqwest exposes the “pool_max_idle_per_host” option of hyper’s client
builder. This option used to be called “max_idle_per_host” in the hyper
crate, but it has recently been renamed [1].

This patch renames the reqwest representation of this option to make it
consistent with its name in the hyper crate again.

[1] https://github.com/hyperium/hyper/pull/2142
2020-05-22 08:05:44 -07:00
Patrick Lühne
b5706f2d89 Make pool idle timeout configurable (#866)
hyper’s ClientBuilder has an option to define the idle timeout of the
connection pool. As it’s quite useful to be able to modify this value,
this patch extends reqwest’s ClientBuilder to expose that option as
well. The default value of 90 seconds is taken from hyper.
2020-05-22 07:37:02 -07:00
Marat Radchenko
90534fa78b Update dependencies (#872) 2020-05-21 11:12:34 -07:00
Héctor Ramón
63376de793 Implement Response::content_length for wasm32 (#863) 2020-05-21 10:46:56 -07:00
x1957
0595c04d10 impl TryFrom http::Request (#887) 2020-05-21 09:23:14 -07:00
messense
f332b43d08 Update cookie_store crate version to 0.11 (#914) 2020-05-17 08:05:16 -07:00
Josh Stone
a1b1a1f19b Upgrade dev-dep libflate to 1.0 (#909) 2020-05-11 19:24:22 -07:00
Montgomery Edwards⁴⁴⁸
1afbf98378 Update list of OpenSSL versions supported (#890)
Update Requirements for Linux to include OpenSSL 1.1.1.

sfackler/rust-openssl supports OpenSSL 1.0.1 through 1.1.1, but its docs are out of date.

Closes #889
2020-04-26 15:17:54 -07:00
Sean McArthur
94d9b325ec Create FUNDING.yml 2020-04-14 15:17:12 -07:00
Lucas
c81eb4ec41 document internal Arc of reqwest::Client (#876) 2020-04-10 11:34:21 -07:00
Yevhenii Babichenko
71368104e3 remove dependency on rustls-native-certs (#862) 2020-03-26 09:06:01 -07:00
Sean McArthur
1f834714f0 Enable TCP nodelay by default (#860) 2020-03-25 12:38:29 -07:00
x1957
84a560a4fa update hyper from 0.13.3 to 0.13.4 (#858) 2020-03-24 08:28:44 -07:00
Paolo Barbolini
b61f81d356 Import 'time' only when using the cookie feature (#855) 2020-03-17 17:47:03 -07:00
dependabot[bot]
b76b048037 Bump acorn from 6.3.0 to 6.4.1 in /examples/wasm_github_fetch
Bumps [acorn](https://github.com/acornjs/acorn) from 6.3.0 to 6.4.1.
- [Release notes](https://github.com/acornjs/acorn/releases)
- [Commits](https://github.com/acornjs/acorn/compare/6.3.0...6.4.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-03-16 11:34:42 -07:00
dependabot[bot]
d9171deda3 Bump acorn from 6.3.0 to 6.4.1 in /examples/wasm_header
Bumps [acorn](https://github.com/acornjs/acorn) from 6.3.0 to 6.4.1.
- [Release notes](https://github.com/acornjs/acorn/releases)
- [Commits](https://github.com/acornjs/acorn/compare/6.3.0...6.4.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-03-16 11:17:52 -07:00
Kent Fredric
c6fbbd9181 Disable test_blocking_inside_a_runtime without cfg(debug_assertions)
As by default, when executing tests with -C opt-level=n where "n"
is greater than 0, debug assertions are disabled, which removes the
panic!() this test is expecting.

With this tweak, tests no longer fail with any choice of -C opt-level,
and additionally, tests still execute correctly if these tests are
compiled with:

  -C opt-level=3 -C debug-assertions=yes

Closes: https://github.com/seanmonstar/reqwest/issues/831
2020-03-09 11:47:57 -07:00
Kent Fredric
6a41459862 Guard reqwest::proxy libtests against concurrent ENV modification
As ENV is process global, modifying it within a thread (as is normal
for all test targets in a rust libtest) results in a concurrency
data-race.

This patch fences the two known cases of needing to modify this by
locking all ENV modifications, and collection of data dependent on
said modifications, into a narrow path isolated by a Mutex lock, with
no test assert!()'s while the Mutex is held
( to avoid a Mutex Posioning ).

However, the code doesn't treat lock failure as a special circumstance,
and if the lock fails, then the pre-existing risk of conccurent ENV
modification returns, and these 2 tests can still randomly fail, but
_in that situation_.

And as mutexes can _only_ be poisoned by the 2 threads holding this
mutex, this regression can now only trip into concurrency issues when
either of these 2 tests are already failing from _non test_ assertions,
so this patch still improves the status quo substantially.

Closes: https://github.com/seanmonstar/reqwest/issues/829
2020-03-09 11:30:04 -07:00
Alex Gaynor
b42d2e0e0c Bumped base64 to latest 2020-03-09 08:59:09 -07:00
Sean McArthur
ead2822321 v0.10.4 2020-03-03 17:12:17 -08:00
Sean McArthur
603d498d2c De-duplicate Body::poll_next and poll_data 2020-03-03 16:34:36 -08:00
Sean McArthur
a06e03edf4 Refactor gzip and brotli bools into an Accepts struct 2020-03-03 16:31:19 -08:00
Sean McArthur
2f875255e1 Fix deprecated hyper client builder methods 2020-03-03 15:47:49 -08:00
Konrad Gołuchowski
526afe9d86 Add bytes() function to blocking::Response 2020-03-03 14:06:15 -08:00
Yuhao Fang
f267e1435d Adds From trait for http::Request 2020-03-03 11:24:12 -08:00
daxpedda
a5f3de0740 Remove unnecessary Result returns. 2020-03-03 10:54:49 -08:00
daxpedda
c1c2b9dd7b Implement ability to disable trust-dns in ClientBuilder. 2020-03-03 10:54:49 -08:00
daxpedda
d2fc485d11 Enable trust-dns in CI. 2020-03-03 10:54:49 -08:00
Diggory Blake
3aef11a9f9 Add a method to buffer a request body into memory, and a method to access the request body when it is already buffered. (#801) 2020-02-27 14:12:48 -08:00
Sean McArthur
2e983694f6 Re-enable trust-dns optional feature (#787) 2020-02-27 12:57:13 -08:00