Commit Graph

647 Commits

Author SHA1 Message Date
Sean McArthur
11d477f49a v0.9.17 2019-05-15 13:22:42 -07:00
prfss
c7da30149a Fix cookie header to not include set-cookie attributes (#522) 2019-05-15 13:12:22 -07:00
Ben Boeckel
1bdc3fa3c8 request: test adding duplicate headers to the request (#519) 2019-05-03 11:48:31 -07:00
Sean McArthur
bf5a268079 v0.9.16 2019-04-30 15:27:12 -07:00
WindSoilder
e0a52dcf5d Include new cookie header after a redirect (#514)
Closes #510
2019-04-30 15:15:41 -07:00
Guillaume Gomez
66a88d946b Add doc-comment to test README examples (#515) 2019-04-30 14:11:10 -07:00
Ziyang Li
40550aec7a Allow user to specify a default encoding when reading Response to text (#511)
Add a function `text_with_charset` which allows the user to provide a default charset encoding. The behavior of this still prefers the provided charset inside the http header over the provided default encoding.
2019-04-29 11:47:01 -07:00
Sean McArthur
6df910a61c re-add Error::cause() impl 2019-04-25 18:36:31 -07:00
Sean McArthur
29f7fa74cc combine ClientError and ServerError into Status kind 2019-04-25 10:54:55 -07:00
Sean McArthur
45484d8077 implement Error::source() 2019-04-25 10:45:30 -07:00
Sean McArthur
17850942c8 remove some noise from Error debug format 2019-04-25 10:32:53 -07:00
Sean McArthur
e4b91ad201 improve error messages from gzip decoder 2019-04-25 10:28:13 -07:00
quininer
6fe3d6a8a0 fix gzip + chunked encoding reuse of connection (#509)
Closes #508
2019-04-25 09:46:39 -07:00
Adilson Neto
f798a8b2df Remove trailing '?' on empty query. (#506)
Closes #464
2019-04-24 17:36:24 -07:00
Chen Rotem Levy
265065f20d Typo in rustdoc (#507)
s/certicates/certificates/
2019-04-24 10:29:23 -07:00
Sean McArthur
f6ce085457 Propagate async timeout to response body (#503) 2019-04-22 15:24:35 -07:00
Sean McArthur
ce51fe83d6 Add request timeout support to async Client (#501)
Closes #496
2019-04-22 12:43:30 -07:00
Sean McArthur
08054a3984 v0.9.15 2019-04-15 12:36:27 -07:00
Jerome Gravel-Niquet
77434a29aa Fix overwriting of appended request headers (#493)
* don't overwrite appended user headers

* Fixes tests, all header ordering related

* does not need to clone default headers, added a test
2019-04-15 12:33:03 -07:00
Sean McArthur
9ddeb5ad22 v0.9.14 2019-04-09 13:13:53 -07:00
Sean McArthur
8ee46f89f8 update docs and readme about cookies and socks 2019-04-09 12:57:53 -07:00
Sean McArthur
f9e88b0928 use Cookie constructor instead of Self() 2019-04-09 12:54:10 -07:00
Christoph Herzog
9935a8e117 CookieStore cleanup/fixes
* Remove TODO
* Remove Cookie::set_ setters
* Do not expose SameSite enum, provide getters on Cookie instead
* Simplify Response::cookies signature (now ignores errors)
2019-04-09 12:54:10 -07:00
Christoph Herzog
954fdfae30 Implement cookie store support
This commit introduces a cookie store / session support
for both the async and the sync client.

Functionality is based on the cookie crate,
which provides a HTTP cookie abstraction,
and the cookie_store crate which provides a
store that handles cookie storage and url/expiration
based cookie resolution for requests.

Changes:
* adds new private dependencies: time, cookie, cookie_store
* a new cookie module which provides wrapper types around
    the dependency crates
* a Response::cookies() accessor for iterating over response cookies
* a ClientBuilder::cookie_store() method that enables session functionality
* addition of a cookie_store member to the async client
* injecting request cookies and persisting response cookies
* cookie tests

NOTE: this commit DOES NOT expose the CookieStore itself,
limiting available functionality.

This is desirable, but omitted for now due to API considerations that should be fleshed out in the future.
This means users do not have direct access to the cookie session for now.
2019-04-09 12:54:10 -07:00
Diggory Blake
c45ff29bfb Add support for SOCKS5 proxies, and parsing proxy authorizations from URLs 2019-04-08 11:42:18 -07:00
Sean McArthur
871ec6f989 v0.9.13 2019-04-01 18:45:16 -07:00
Sean McArthur
5c3494b81d Check redirect locations are valid Uris (#486)
Closes #484
2019-04-01 11:13:01 -07:00
Arnaud de Bossoreille
d62f8c2bbd Body: don't call poll_ready on tx when 0 bytes remaining. (#479)
Some web servers (if IIS is a web server) may close their request
stream early when they consider the input is complete. That leads to
poll_ready returning an error of kind "Closed" which is legitimate as
the receiver disappeared. So this change ignores the case when the body
has been fully transmitted.
2019-03-26 13:09:08 -07:00
Sean McArthur
f77ec53e59 v0.9.12 2019-03-20 14:18:39 -07:00
Sean McArthur
faaf41cdfb Fix basic_auth async builder to send capital "Basic"
Closes #468
2019-03-20 14:11:40 -07:00
quininer
f02ca0ded0 disable Nagle's for default-tls handshake 2019-03-20 14:09:31 -07:00
quininer
47640170bb Add tcp_nodelay for Builder 2019-03-20 14:09:31 -07:00
quininer
f5e7e883c7 disable nagle algorithm for TLS handshake 2019-03-20 14:09:31 -07:00
CJP10
a54bfc1a39 added max_idle_per_host as an option to the builder (#473) 2019-03-19 13:23:32 -07:00
quininer
3554b0ad26 replace libflate with flate2 (#476) 2019-03-19 13:21:43 -07:00
Frank Benkstein
08847cc9f5 add bearer auth to async RequestBuilder (#475) 2019-03-13 11:00:54 -07:00
quininer
a27db28deb fix proxy missing alpn (#466)
* fix #459

* disable alpn for proxy connection
2019-03-06 11:02:55 -08:00
Sean McArthur
d7475d61f2 v0.9.11 2019-03-04 11:41:54 -08:00
Ian Smith
215981e7a0 Add percent_encode_noop configuration to Form (#467)
Some implementations of multipart/form parsing don't support alternate
encodings, but do allow unicode in 'standard' parameter values. This
change allows users to specify that they do not want to encode
parameters.

(See also: #419, #420.)
2019-03-04 11:21:35 -08:00
Antoine Carton
aa8348ba1e Add http1_title_case_headers option to ClientBuilder (#463) 2019-02-27 13:21:50 -08:00
Constantin Nickel
4fba983e5e async/client: return a impl Future on execute() 2019-02-20 17:59:12 -08:00
Sean McArthur
cd0e4b3c2e Add Error::is_timeout() accessor 2019-02-20 15:15:55 -08:00
Sean McArthur
9e2b56ba56 Add connect_timeout to async and sync clients 2019-02-20 15:15:55 -08:00
Sean McArthur
66db8d6283 refactor connect_async module into connect module 2019-02-20 15:15:55 -08:00
Sean McArthur
5deb5705f5 v0.9.10 2019-02-18 11:54:14 -08:00
Manuel Alejandro
f96f9454fd Fixing Identity::from_pem which was failing when there was a PKCS1 RSA private key but not PKCS8 key (#458) 2019-02-16 12:30:18 -08:00
Michael Habib
e49f5ee404 add Response::error_for_status_ref to allow borrowing (#457) 2019-02-15 14:33:18 -08:00
Luca Bruno
0c84e6b9e9 async/request: add a basic example for send() 2019-02-15 10:33:57 -08:00
Luca Bruno
8b62f47ac3 async/request: return a impl Future on send() 2019-02-15 10:33:57 -08:00
Luca Bruno
5e38b419f0 async/reponse: return a impl Future on json() 2019-02-15 10:33:57 -08:00