L. Kärkkäinen
5832764aab
Merge branch 'master' into streaming
2020-03-25 14:58:45 +02:00
L. Kärkkäinen
42af6e1af6
Add a check for request body functions and a test for NotImplementedError.
2020-03-25 14:35:09 +02:00
L. Kärkkäinen
4db075ffc1
Streaming migration for 20.3 release ( #1800 )
...
* Compatibility and deprecations for Sanic 20.3 in preparation of the streaming branch.
* Add test for new API.
* isort tests
* More coverage
* json takes str, not bytes
Co-authored-by: L. Kärkkäinen <tronic@users.noreply.github.com>
2020-03-24 10:11:09 -07:00
L. Kärkkäinen
f1c85eb1f8
Add clarifying comment
2020-03-22 18:07:35 +02:00
L. Kärkkäinen
23e54fc546
Fix tracking of HTTP stage when writing to transport fails.
2020-03-20 17:20:20 +02:00
Kevin Guillaumond
60b4efad67
Update config docs to match DEFAULT_CONFIG ( #1803 )
...
* Set REAL_IP_HEADER's default value to "X-Real-IP"
* Update config instead
2020-03-14 08:57:39 -07:00
L. Kärkkäinen
9098493da9
Linter
2020-03-10 17:03:11 +02:00
L. Kärkkäinen
17d100400f
Middleware and error handling refactoring.
2020-03-10 16:45:26 +02:00
L. Kärkkäinen
d2d6008eec
Need to check if transport is closing to avoid getting stuck in sending loops after peer has disconnected.
2020-03-10 15:23:22 +02:00
L. Kärkkäinen
2adcc72e06
Response middleware ran by async request.respond().
2020-03-09 16:59:36 +02:00
L. Kärkkäinen
2b63d2bed4
Import ordering
2020-03-09 16:15:08 +02:00
L. Kärkkäinen
9dc2ec966c
Linting
2020-03-09 15:44:06 +02:00
L. Kärkkäinen
a9d984e2f8
Cleanup processed_headers some more.
2020-03-09 15:28:02 +02:00
L. Kärkkäinen
32ee5399d9
Duplicate set-cookie headers were being produced.
2020-03-09 15:09:31 +02:00
L. Kärkkäinen
a0e61ae5c6
35 % speedup in HTTP/1.1 response formatting (not so much overall effect).
2020-03-09 14:35:06 +02:00
L. Kärkkäinen
c86c29e239
Avoid special handling of StreamingHTTPResponse.
2020-03-08 17:46:31 +02:00
L. Kärkkäinen
5351cda979
Unify response header processing of ASGI and asyncio modes.
2020-03-08 17:34:08 +02:00
L. Kärkkäinen
d348bb4ff4
Refactoring and cleanup.
2020-03-08 16:56:22 +02:00
L. Kärkkäinen
990ac52a1a
Header values should be strictly ASCII but both UTF-8 and Latin-1 exist. Use UTF-8B to
...
cope with all.
2020-03-08 14:33:28 +02:00
L. Kärkkäinen
cbfeb1c99c
Fix chunked mode crash.
2020-03-08 12:23:22 +02:00
L. Kärkkäinen
4c34508695
Merge branch 'master' into streaming
2020-03-06 16:30:58 +02:00
L. Kärkkäinen
319388d78b
Remove the old request context API deprecated in 19.9. Use request.ctx instead. ( #1801 )
...
Co-authored-by: L. Kärkkäinen <tronic@users.noreply.github.com>
2020-03-05 21:40:46 -08:00
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