Seth Michael Larson
331be99cbf
Add support for proxy tunnels for Python 3.6 + asyncio. ( #521 )
...
* Backport start_tls() support for Python 3.6
* Remove version check in start_tls test
2019-11-17 12:50:54 +01:00
Tom Christie
5aca0c0172
Fix redirect cookie behavior ( #529 )
...
* Fix redirect cookie behavior
* Drop flake8-comprehensions
* Add redirect cookie tests
2019-11-15 21:31:15 +00:00
Jonas Lundberg
1a32cf036a
Rename BaseTCPStream/TCPStream to BaseSocketStream/SocketStream ( #517 )
2019-11-08 17:09:38 +01:00
Florimond Manca
586acddd1a
Improve robustness of live HTTP/2 test ( #512 )
2019-11-08 00:35:34 +01:00
Florimond Manca
08069e9368
Add DEBUG logs of HTTP requests ( #502 )
2019-11-06 22:56:25 +01:00
Florimond Manca
2fcf23bbfe
Refactor debug and trace log tests ( #506 )
2019-11-06 12:04:20 +01:00
Florimond Manca
07586f97e8
Convert debug logs to trace logs ( #500 )
...
* Convert debug logs to trace logs
* Update environment variables docs
* Update logging test
2019-11-02 22:40:15 +01:00
Florimond Manca
e3140a0803
Reorganize timeout config tests ( #491 )
2019-10-22 22:04:42 +02:00
Jamie Hewland
88d73de752
asyncio: Wait for the stream to close when closing ( #494 )
2019-10-22 22:01:40 +02:00
Yeray Diaz Diaz
9ec2cfc5dc
Multipart files tweaks ( #482 )
...
* Allow filenames as None in multipart encoding
* Allow str file contents in multipart encode
* Some formatting changes on `advanced.md`
* Document multipart file encoding in the advanced docs
* Update docs/advanced.md
Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>
2019-10-20 13:25:00 +01:00
Jamie Hewland
644e8fc5b6
Make start_tls a method on streams & return a new stream ( #484 )
...
* Move start_tls to stream & return a new stream
* asyncio: Keep a reference to the inner stream when upgrading to TLS
2019-10-20 12:59:16 +02:00
mariaS210
7200717e82
Add logic for determining if a URL should be proxied ( #472 )
2019-10-17 10:58:11 -05:00
Can Sarıgöl
84731c8be5
Cache netrc authentication per-client ( #400 )
2019-10-16 08:31:47 -05:00
camellia256
49ed77a706
Rely on getproxies for all proxy environment variables ( #470 )
2019-10-12 10:34:50 -05:00
Florimond Manca
38a136833f
Add start_tls to Trio backend ( #467 )
2019-10-10 07:01:23 -05:00
Florimond Manca
57ae7ea22b
Allow lists in query params ( #386 )
2019-10-08 15:12:04 -05:00
Florimond Manca
fc3df514e8
Don't check trio import in definition of backend fixture params ( #447 )
2019-10-05 19:12:06 -05:00
Florimond Manca
24346e2039
Fix flaky Response.elapsed tests ( #446 )
2019-10-04 15:36:06 -05:00
Can Sarıgöl
dd3fbcc8d7
Don't include username/password components in Host header ( #417 )
...
* removed auth and port from host of header
* used URL attribute rather _uri_reference
* reverted removing port into host
* reverted username and password from header
* applied new copy_with with username and password
2019-10-04 10:33:18 +01:00
Can Sarıgöl
e6da325e8b
added authority copy feature in URL.copy_with ( #436 )
2019-10-04 09:17:25 +01:00
Josep Cugat
86a0eb0268
Revert "Use Python 3.8 asyncio.Stream where possible ( #369 )" ( #423 )
...
This reverts commit 71cbde8ba4 .
2019-10-03 09:18:10 +01:00
Josep Cugat
a0282569d5
Make HTTPError importable from the top-level ( #421 )
2019-10-01 13:37:05 -05:00
Stephen Brown II
db3e3a0231
Add flake8-pie plugin ( #419 )
2019-10-01 12:02:29 -05:00
Seth Michael Larson
05f5dc26de
Get test suite back to ~100% line coverage ( #406 )
2019-09-29 13:58:22 -05:00
Jamie Hewland
71cbde8ba4
Use Python 3.8 asyncio.Stream where possible ( #369 )
2019-09-28 12:23:14 -05:00
Seth Michael Larson
336d22d73a
Propogate HTTPProxy config from Client( #377 )
2019-09-25 07:17:20 -05:00
Florimond Manca
cadb9a4d4c
Fix bug when using client without timeouts in Python 3.6 ( #383 )
2019-09-25 06:31:50 -05:00
Florimond Manca
e62e5c3758
Add debug logs to ASGIDispatch ( #371 )
...
* Add debug logs to ASGIDispatch
* Tidy up ASGIDispatch
* Log entire scope and ASGI messages
* Obfuscate sensitive headers using common utility
* Update utils.py
2019-09-23 22:49:24 +02:00
Can Sarıgöl
c9810a79d9
Add support for SSL_CERT_FILE and SSL_CERT_DIR ( #307 )
2019-09-23 10:24:53 -05:00
Tyrel Souza
5dc646fb9f
Adding params to Client ( #372 )
2019-09-23 09:22:21 -05:00
Seth Michael Larson
b574230f90
Remove ENABLE_CONNECT_PROTOCOL from HTTP/2 Settings ( #373 )
2019-09-22 17:37:57 -05:00
Florimond Manca
08355c62f5
Add trio concurrency backend ( #276 )
2019-09-21 11:10:20 -05:00
Seth Michael Larson
b0fa0859a8
Configure Proxy from Client ( #353 )
...
* Incorporate suggestions
* Start of proxy config
* Incorporate suggestions
* Add proxies to high-level API, docs
* Update client.py
2019-09-20 12:33:06 -05:00
Jamie Hewland
338a360785
Use a certificate issued from the trustme CA in tests ( #357 )
2019-09-18 18:59:27 -05:00
Roy Williams
05ac117679
Add .elapsed onto Response objects tracking how long a request took. ( #351 )
...
* Add `.elapsed` onto Response objects tracking how long a request took.
* Move elapsed timing from send methods into _get_response
* Address feedback
* Update tests/test_api.py
Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>
2019-09-18 20:29:01 +02:00
Yeray Diaz Diaz
8155352d20
Document digest auth ( #348 )
...
* Document authentication
* Fix linting errors
* Tweak wording
* Update docs/quickstart.md
Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>
2019-09-16 12:50:00 +01:00
Florimond Manca
6c6148ec5c
Fix remaining references to BaseStream in tests ( #347 )
2019-09-16 08:34:26 +02:00
Florimond Manca
315a18b4cf
Stream -> TCPStream ( #339 )
2019-09-15 16:14:48 -05:00
Seth Michael Larson
57c27cac36
Implement HTTPProxy dispatcher ( #259 )
2019-09-15 10:47:35 -05:00
Florimond Manca
f1dde95d35
Test Requests entrypoints ( #330 )
...
* Test Requests entrypoints
* Show summary of unsuccessful tests
2019-09-12 23:24:33 +02:00
Yeray Diaz Diaz
1cd9156d5d
Additional DigestAuth tests ( #334 )
2019-09-11 07:25:11 -05:00
Yeray Diaz Diaz
fd3b69d2aa
Add DigestAuth middleware ( #332 )
...
* Remove global variable, just return response from auth request
* Add extra space to Digest header start assertion
* Prevent unpacking errors limiting the number of splits
2019-09-10 14:53:39 -05:00
Dobrovolsky Bogdan
08edfac37d
Add build_request to Client ( #319 )
...
* Update documentation
* Update documentation
* Update tests
Rename `_send` -> `_get_response`
Update documentation
* Code format with black
* Change documentation example to OPTIONS *
* Update documentation
Small code reformat
* `echo_headers` return json
* Simplify test
* Fix typo
2019-09-08 08:03:59 -05:00
Gaurav Dhameeja
0f34f3b60f
Raise KeyError if header isn't found in Headers ( #324 )
2019-09-07 16:12:37 -05:00
IsaacBenghiat
ab9cd0ea11
Fix bug in calculating maximum frame size ( #153 )
2019-09-06 13:06:20 -05:00
Tom Christie
33c5fe0374
Merge pull request #310 from encode/drop-content-length-on-get-redirects
...
Drop Content-Length headers on GET redirects
2019-09-05 10:21:21 +01:00
Tom Christie
5961bd8ba3
Apply black formatting
2019-09-04 15:11:40 +01:00
Tom Christie
4336550d22
Add tests for dropping Content-Length headers
2019-09-04 15:06:14 +01:00
Yeray Diaz Diaz
fa74aaa6db
Add test for origin from URL string ( #312 )
2019-09-04 13:43:24 +02:00
Seth Michael Larson
b8c5e7a852
Add os.environ fixture ( #308 )
2019-09-02 23:12:52 +02:00