Commit Graph

867 Commits

Author SHA1 Message Date
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
Sean McArthur
ae81a30cf7 Document serde dependency in JSON examples
Closes #818
2020-02-27 12:52:57 -08:00
Sean McArthur
9a66c5748b Document advanced (brittle) nature of use_preconfigured_tls 2020-02-27 12:47:38 -08:00
Sean McArthur
c916dc03cc Improve performance of Response::bytes() (#827) 2020-02-27 12:44:04 -08:00
Sean McArthur
41722a14fd Update README and Cargo.toml about wasm 2020-02-27 11:54:43 -08:00
Sean McArthur
53c5aaa259 v0.10.3 2020-02-26 16:48:45 -08:00
Alex Gaynor
a2acf91d9b Bump rustls crate versions to latest (#822) 2020-02-24 15:53:52 -08:00
Sean McArthur
296490ce45 Bump tokio minimum version to 0.2.5 2020-02-24 10:25:17 -08:00
Sean McArthur
9bb455d125 v0.10.2 2020-02-21 12:42:51 -08:00
Sean McArthur
2e06108f70 Require the native-tls feature to supply a preconfigured tls (#814) 2020-02-21 12:41:13 -08:00
Nick Lanham
9ab8ab945c add ability to create a client with own tls connector (#809) 2020-02-21 11:39:31 -08:00
lzutao
b3d5f78b8f actions: Remove --all flag from rustfmt (#795)
The --all flag of rustfmt may trigger metadata resolution
which maybe slow down formatting in this case.
2020-02-21 11:38:38 -08:00
Paolo Barbolini
d4a88a8d35 Implement RequestBuilder::json for wasm32 target (#812) 2020-02-20 10:22:03 -08:00
Paolo Barbolini
7214e123c4 Implement Default for Client and ClientBuilder on the wasm32 target (#813) 2020-02-20 08:44:19 -08:00
Jack Moffitt
5a2cf97872 Implement Default for Client, ClientBuilder, and Form (#811) 2020-02-19 22:02:49 -08:00
EnokMan
f831d62da0 Brotli support (#791) 2020-02-19 12:49:11 -08:00
Luca Bruno
7622c75064 blocking: opt-out CPUs auto-detection in debug mode (#807)
This tweaks the tokio runtime checker (only used in debug mode) in
order to use a single thread.
Performing the CPUs auto-detection step on each check adds significant
syscall-tracing noise and runtime latency. This completely skips it.
2020-02-17 10:05:22 -08:00
Héctor Ramón
f6ff7f4364 Implement Response::json for wasm32 target (#802) 2020-02-06 10:39:57 -08:00
Sean McArthur
04980689ce Newest rustfmt changes 2020-02-06 10:17:40 -08:00
WindSoilder
4c1290fc2a Document socks proxy in lib. (#793) 2020-01-20 14:42:26 -08:00
Sean McArthur
76ca042faf Only set nodelay for HTTPS if not already set (#783) 2020-01-13 14:26:55 -08:00
Sean McArthur
e31d5221fe Refactor connect errors to not use io::Error (#782) 2020-01-13 13:29:14 -08:00
Sean McArthur
14908ad3f0 Improve debug logging (#781) 2020-01-13 12:24:38 -08:00
Paolo Barbolini
1478313756 wasm: add error_for_status to wasm response (#779)
Adds the error_for_status and error_for_status_ref functions
to wasm::Response
2020-01-09 17:06:56 -08:00
Sean McArthur
d662c850a9 v0.10.1 2020-01-09 13:50:56 -08:00
Paolo Barbolini
fd88e0c648 wasm: add url function to wasm response (#777)
Adds the url function to wasm::Response
2020-01-09 13:43:08 -08:00
Sean McArthur
50c33a932e Add connection_verbose setting to log IO events (#774) 2020-01-09 13:42:01 -08:00
r-arias
20d50daa8b re-add the "socks" feature (using tokio-socks) (#769)
The "socks" feature has been removed for a while now, the optional
dependency on the "socks" crate commented out.

The code for actually providing the socks feature was, however, still
mostly present, if a bit out of date.

This commit re-adds the socks feature using the tokio-socks (instead of
socks) crate.

Closes #620
2020-01-09 12:25:26 -08:00
rhysd
6004623784 Add RequestBuilder::fetch_mode_no_cors() 2020-01-08 11:47:47 -08:00
Konrad Gołuchowski
22fe6566ff Provide request timeout for blocking API (#764) 2020-01-07 12:24:23 -08:00
kodieg
b159963f6c Add request timeout (#761)
Closes #754
2020-01-03 11:25:04 -08:00
Sean McArthur
c0f717cf30 Enable blocking, cookies, and json features on Playground 2020-01-02 11:44:04 -08:00