Commit Graph

2243 Commits

Author SHA1 Message Date
L. Kärkkäinen
730de6afda Default to no maximum request size for streaming handlers. 2020-03-04 15:25:50 +02:00
L. Kärkkäinen
eb66621544 json takes str, not bytes 2020-03-04 13:21:49 +02:00
L. Kärkkäinen
dc6b4925df Add test for new API. 2020-03-04 12:25:46 +02:00
L. Kärkkäinen
cbabe7ec4a Avoid error messages on PayloadTooLarge. 2020-03-02 17:06:18 +02:00
L. Kärkkäinen
c2e5674a73 Add a missing check in case of close_if_idle on a dead connection. 2020-03-02 16:55:48 +02:00
L. Kärkkäinen
9c21457b58 Always try to consume request body, plus minor cleanup. 2020-03-02 16:34:21 +02:00
L. Kärkkäinen
85d58d7b2b Messages further tuned. 2020-03-02 15:36:43 +02:00
L. Kärkkäinen
96a8b5c3a0 Init http.response = None 2020-03-02 15:33:23 +02:00
L. Kärkkäinen
e73f26b0a3 More specific error messages on Payload Too Large. 2020-03-02 15:32:12 +02:00
L. Kärkkäinen
50cca39185 Stricter handling of request header size 2020-03-02 15:07:40 +02:00
L. Kärkkäinen
9baa2419cd Merge branch 'master' into streaming 2020-03-02 14:05:15 +02:00
Subham Roy
ce71514d71
bump httpx dependency version to 0.11.1 (#1794) 2020-03-01 11:42:11 -08:00
L. Kärkkäinen
7833d70d9e
Allow multiple workers on MacOS with Python 3.8. Fallback to single worker on Windows until pickling can be fixed. (#1798) 2020-03-01 11:41:09 -08:00
L. Kärkkäinen
7e93ee102c Typing 2020-03-01 18:21:09 +02:00
L. Kärkkäinen
08353637fd Linter 'n fixes 2020-03-01 17:40:01 +02:00
L. Kärkkäinen
31a8706b42 Fix a middleware cancellation handling test with py38. 2020-03-01 17:10:04 +02:00
L. Kärkkäinen
d918655bbb Py 3.8 check for deprecated loop argument. 2020-03-01 16:57:03 +02:00
L. Kärkkäinen
0712026e14 Remove unused code. 2020-03-01 16:36:42 +02:00
L. Kärkkäinen
1c42a5ef4e Minor fixes. 2020-03-01 16:34:58 +02:00
L. Kärkkäinen
5a96996003 A test was missing that body_init/body_push/body_finish are never called. Rewritten using receive_body and case switching to make it fail if bypassed. 2020-03-01 16:34:20 +02:00
L. Kärkkäinen
c0a0b50bc1 Remove unnecessary variables, optimise performance. 2020-03-01 15:38:18 +02:00
L. Kärkkäinen
fc16594138 Disable custom protocol test 2020-03-01 14:53:04 +02:00
L. Kärkkäinen
5086076590 Linter 2020-03-01 13:21:02 +02:00
L. Kärkkäinen
f8298939c0 Merge branch 'master' into streaming 2020-03-01 13:13:39 +02:00
L. Kärkkäinen
2840e4cfc8 Everything but CustomServer OK. 2020-03-01 13:10:53 +02:00
L. Kärkkäinen
85be5768c8 Remove keep-alive header from responses. First of all, it should say timeout=<value> which wasn't the case with existing implementation, and secondly none of the other web servers I tried include this header. 2020-03-01 12:15:16 +02:00
L. Kärkkäinen
7f41c5fa6b Even more cleanup and error checking, 8 failing tests. 2020-02-29 18:59:19 +02:00
L. Kärkkäinen
a553e64bbd Much cleanup, 12 failing... 2020-02-29 16:50:59 +02:00
L. Kärkkäinen
57202bfa89 Code cleanup, 14 tests failing. 2020-02-29 14:18:31 +02:00
L. Kärkkäinen
8a1baeb9d5 Terminate check_timeouts once connection_task finishes. 2020-02-28 19:25:03 +02:00
L. Kärkkäinen
85b1ad5732 Major refactoring of HTTP protocol handling (new module http.py added), all requests made streaming. A few compatibility issues and a lot of cleanup to be done remain, 16 tests failing. 2020-02-28 18:43:36 +02:00
L. Kärkkäinen
85c67a0014 Remove tests using the deprecated get_headers function that can no longer be supported. Chunked mode is now autodetected, so do not put content-length header if chunked mode is preferred. 2020-02-28 18:40:44 +02:00
L. Kärkkäinen
d5971377c5 Remove StreamBuffer tests because the type is about to be removed. 2020-02-28 17:38:09 +02:00
L. Kärkkäinen
b2476bd7d7 Better testing error messages on protocol errors. 2020-02-28 17:26:31 +02:00
L. Kärkkäinen
6d8f5988d3 Let black f*ckup the layout 2020-02-26 19:27:22 +02:00
L. Kärkkäinen
29c6f3c49f Entirely remove request body queue. 2020-02-26 19:23:55 +02:00
L. Kärkkäinen
b87364bd91 All tests OK. 2020-02-26 19:00:38 +02:00
L. Kärkkäinen
6b9f0ece7c Misc. cleanup, down to 4 failing tests. 2020-02-26 14:24:45 +02:00
L. Kärkkäinen
42d86bcd5a Rewritten request body parser. 2020-02-26 13:03:33 +02:00
Mykhailo Yusko
16961fab9d
Use f-strings instead of str.format() (#1793) 2020-02-25 14:01:13 -06:00
L. Kärkkäinen
ef4f233fba Add back streaming requests. 2020-02-24 17:27:28 +02:00
L. Kärkkäinen
3d05e1ec07 Change of test: don't require early bad request error but only after CRLF-CRLF. 2020-02-24 17:27:04 +02:00
L. Kärkkäinen
f6a0b4a497 Async http protocol loop. 2020-02-24 16:23:53 +02:00
L. Kärkkäinen
861e87347a
Fix #1788 incorrect url_for for routes with hosts, added tests. (#1789)
* Fix #1788 incorrect url_for for routes with hosts, added tests.

* Linter

* Remove debug print
2020-02-21 09:10:22 -08:00
L. Kärkkäinen
f609a4850f Cleanup of code and avoid mixing streaming responses. 2020-02-21 17:51:38 +02:00
L. Kärkkäinen
fe64a2764d Make all requests streaming and preload body for non-streaming handlers. 2020-02-21 13:28:50 +02:00
L. Kärkkäinen
6279eac3d1 Streaming request by async for. 2020-02-21 10:51:58 +02:00
Tim Gates
91f6abaa81
Fix simple typo: viewes -> views (#1783)
Closes #1782
2020-02-17 10:16:58 -06:00
Eli Uriegas
d380b52f9a
Merge pull request #1784 from gdub/changelog_correction
Corrected changelog for docs move of MD to RST (#1691).
2020-02-15 17:09:41 -08:00
Gary Wilson Jr
d656a06a19 Corrected changelog for docs move of MD to RST (#1691). 2020-02-11 11:45:56 -06:00