Commit Graph

1520 Commits

Author SHA1 Message Date
Yeray Diaz Diaz
fa74aaa6db Add test for origin from URL string (#312) 2019-09-04 13:43:24 +02:00
florimondmanca
c2eeb662df
Remove example script 2019-09-03 19:22:03 +02:00
Tom Christie
e5964b31f1 White whitespacing 2019-09-03 15:02:40 +01:00
Tom Christie
0a2d58b8f1 Apply black formatting (Tho it looks like a broken case to me?) 2019-09-03 15:01:37 +01:00
Tom Christie
0276ff9880 Drop Content-Length headers on GET redirects 2019-09-03 14:36:03 +01:00
Seth Michael Larson
b8c5e7a852 Add os.environ fixture (#308) 2019-09-02 23:12:52 +02:00
Florimond Manca
40e6e8c99d
Refactor client functionality into middleware (#268)
Co-authored-by: yeraydiazdiaz <yeraydiazdiaz@gmail.com>

* Dispatcher middlewares

* Redirect and BasicAuth dispatchers
* Remove HTTPBasicAuth and reinstate trust_env logic
* Call resolve dispatcher correctly
* Fix redirection tests
* Add basic and custom auth dispatchers
* Reinstate extracting cookies from response
* Fix linting

* Refactor middleware interface
2019-09-01 23:01:14 +02:00
Tomás Farías
db7f2d0df3 Add support for SSLKEYLOGFILE (#301)
* Skip test if OpenSSL version is lower than 1.1.1

* Use bionic dist for Python 3.8 job

* Pass trust_env to SSLConfig use monkeypatch in testing

* Don't raise KeyError if SSLKEYLOGFILE is not set

* Move trust_env after verify and cert
2019-09-01 08:01:11 -05:00
Bakhtiyor Ruziev
e34d280673 Add server.url property in tests (#300)
* Add server.url to test server

* Move a property to top of the class
2019-09-01 09:07:22 +02:00
Florimond Manca
a46462764e Tighten up response.next() (#297) 2019-08-31 09:09:35 -05:00
Florimond Manca
994403bec9
Serve test server in thread (#292) 2019-08-29 23:17:14 +02:00
Min ho Kim
e9b20995f7 Fix typos in comments (#294) 2019-08-29 19:14:15 +02:00
Seth Michael Larson
8c456e48e9
Release 0.7.2 (#291) 2019-08-29 07:19:02 -05:00
toppk
9e420a5c34 Automatically convert Client.cookies and Client.headers on set (#274) 2019-08-27 19:25:30 -05:00
Jt Miclat
1f4b8dd054 Allow per file running of tests (#287)
* Allow per file running of tests

* Simply PR
2019-08-27 11:51:36 -05:00
Seth Michael Larson
6f4f186522
Add easier debug logging for users (#277)
Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>
2019-08-27 11:43:13 -05:00
Jt Miclat
33032df0b0 Stop running nox on first error (#286) 2019-08-27 11:08:50 -05:00
Seth Michael Larson
e7aa6d6710
Force HTTP/1.1 on short-lived connections (#284) 2019-08-27 07:54:11 -05:00
Florimond Manca
8ea32e647f Add tests to known first parties in isort config (#279) 2019-08-26 15:16:51 -05:00
Florimond Manca
3674058ff7
Parametrize tests with concurrency backend (#273)
* Parametrize tests with concurrency backend

* Refactor server restart

* Add no-backend test
2019-08-25 20:25:18 +02:00
Seth Michael Larson
1872ae873b
Add ConcurrencyBackend.start_tls() (#263) 2019-08-24 10:04:14 -05:00
Florimond Manca
a4b93b91c0 Add missing async test cases (#269) 2019-08-23 07:04:21 -05:00
Seth Michael Larson
46402dd59f
Rely on codecov for 100% project coverage (#264) 2019-08-23 07:00:13 -05:00
Florimond Manca
31748a3025 Add backend param to ASGIDispatcher (#270) 2019-08-22 19:26:09 -05:00
Hugo van Kemenade
20cb8af96f Travis sudo no longer required for Xenial (#266) 2019-08-22 10:30:02 -05:00
Florimond Manca
80eafe89c2
Remove usage of loop.create_task in ASGIDispatch (#261)
* Remove usage of loop.create_task in ASGIDispatch

* Add comment about usage of background manager

* Update comment
2019-08-21 23:11:12 +02:00
Tom Christie
30692272fd
Merge pull request #255 from encode/refactor/stream-interface
Unify BaseReader and BaseWriter as BaseStream
2019-08-21 09:38:39 +01:00
florimondmanca
fdb13592c9
Encapsulate http_version into BaseStream 2019-08-21 09:12:01 +02:00
florimondmanca
14eb81f72d
Unify BaseReader and BaseWriter as BaseStream 2019-08-21 09:02:54 +02:00
Florimond Manca
2e91d8ccdd
Add BaseEvent interface (#260) 2019-08-21 09:02:04 +02:00
Tom Christie
c0554e96d9 Refactor interfaces (#252)
* Move Dispatcher, AsyncDispatcher into dispatch/base.py

* Move concurrency interfaces into concurrency/base.py
2019-08-21 08:35:01 +02:00
Can Sarıgöl
4ea4af661d Raise TypeError if invalid parameter for HTTPVersionConfig (#253) 2019-08-20 17:39:05 -05:00
Florimond Manca
fc261e8149
Add BaseQueue interface (#257) 2019-08-21 00:25:46 +02:00
Tom Christie
e0b523dd1b
Merge pull request #241 from encode/protocol-support
Allow configuration of supported HTTP protocol versions.
2019-08-20 15:16:28 +01:00
Tom Christie
e69ee77843
Drop Protocol str enum class in favor of plain old strings (#251)
* Drop Protocol str enum class in favor of plain old strings

* Drop unused import
2019-08-20 15:15:53 +01:00
Tom Christie
c1ec1c33cd
Response.protocol -> Response.http_version (#250)
* Response.protocol -> Response.http_version

* Update docs
2019-08-20 15:15:38 +01:00
Tom Christie
7408c443f5 Drop unused import 2019-08-20 14:30:23 +01:00
Tom Christie
180050020e Address review comments 2019-08-20 14:26:43 +01:00
Tom Christie
dfbfa7c7ec Drop Protocol str enum class in favor of plain old strings 2019-08-20 14:17:26 +01:00
Tom Christie
b343ee4a70 Add Client(http_versions=...) support 2019-08-20 13:30:54 +01:00
Tom Christie
193196bef3 Merge branch 'master' into protocol-support 2019-08-20 13:08:24 +01:00
Tom Christie
4bfe54d610 Drop unneccessary 'sorted' 2019-08-20 12:58:03 +01:00
Tom Christie
a770102fd2 Added http_versions to dispatch interface 2019-08-20 12:56:19 +01:00
Tom Christie
fc27fd2530 Test coverage for HTTPVersionConfig 2019-08-20 12:33:28 +01:00
Florimond Manca
b2397ff39d Turn concurrency.py into its own sub-package (#244) 2019-08-20 06:27:58 -05:00
Tom Christie
f72fa68802 'Protocols' -> 'HTTPVersions' 2019-08-20 12:21:07 +01:00
Tom Christie
cf098f8f4c Merge branch 'protocol-support' of https://github.com/encode/httpx into protocol-support 2019-08-20 12:03:55 +01:00
Can Sarıgöl
a0aff8d169 fixed __repr__ function of Headers and Url classes (#222) 2019-08-20 11:48:28 +01:00
Tom Christie
2ed70ebc2a
Simplify ASGI concurrency (#248)
* Drop  keyword argument

* Improve docstrings for WSGIDispatch and ASGIDispatch

* Add docs for fine grained WSGI/ASGI control

* Simplify concurrency handling in ASGIDispatch

* Variable renaming

* Fix missing nonlocal declaration

* Split nonlocal onto multiple lines
2019-08-20 11:37:37 +01:00
Tom Christie
7fea0723e2 Use correct protocol idents when loading ssl context 2019-08-19 20:19:40 +01:00