Robert Schütz
9ec5798c0d
fix tests with Twisted 24.7.0 ( #526 )
...
In the fixed test cases the responses now contain `HTTP/1.1` rather than
`HTTP/1.0`.
2024-08-24 20:47:58 +02:00
Carlton Gibson
ef24796243
Validate HTTP header names as per RFC 9110. ( #500 )
...
Fixes #497 .
2024-02-10 15:31:37 +01:00
Alejandro R. Sedeño
9a282dd627
Handle Daphne-Root-Path for websockets, adding root_path to scope. ( #453 )
...
Signed-off-by: Alejandro R. Sedeño <asedeno@mit.edu>
2024-02-06 09:15:03 +01:00
Adam Johnson
12e543750b
Make DaphneProcess pickleable ( #440 )
2022-10-07 13:22:40 +02:00
Carlton Gibson
2b13b74ce2
Added runserver to Daphne. ( #429 )
...
* Made daphne installable as a Django app.
* Added system check to ensure daphne is installed before
django.contrib.staticfiles.
* Moved runserver command from Channels.
* Added changelog entry for runserver command.
2022-08-08 14:10:03 +02:00
Carlton Gibson
71ba440761
Added support for ASGI_THREADS max worker limit. ( #422 )
...
Closes #319
2022-07-06 12:37:26 +02:00
baseplate-admin
54745d0f83
Set a default Server
header for HTTP responses ( #396 )
...
Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
2022-05-24 12:40:02 +02:00
Carlton Gibson
5e709795b4
Updated supported Python and dependency versions. ( #417 )
...
* Updated Python support and dependencies.
* Updated Python support in README.
* Removed PY36 from GHA workflow.
* Remove pre-commit workflow. Fixes #397
* Updated Black in pre-commit to 22.3.0.
* Update all pre-commit hooks.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
2022-05-23 15:34:29 +02:00
Marcin Muszynski
eae1ff0df4
Set default attributes on WebRequest ( #406 )
2022-02-14 16:12:56 +01:00
Adam Johnson
ca61162129
Lint with pre-commit ( #365 )
...
* Lint with pre-commit
* Move existing tox qa hooks into pre-commit.
* Set up GitHub Action based on https://github.com/pre-commit/action/ (we could also use https://pre-commit.ci ).
* Add `pyupgrade` to drop old Python syntax.
* Add `flake8-bugbear` plugin to prevent flake8 errors.
* Drop custom GHA
2021-04-07 20:11:21 +02:00
Patrick Gingras
aae0870971
Handle asyncio.CancelledError in Server.application_checker ( #341 )
...
As of [bpo-32528](https://bugs.python.org/issue32528 ), asyncio.CancelledError is
not a subclass of concurrent.futures.CancelledError. This means that if an
asyncio future raises an exception, it won't be caught. Therefore, the
exception will bubble past the try-except within the loop in application_checker,
resulting in done applications not being cleaned up, and the application_checker
task not being queued again.
2020-11-11 16:12:33 +01:00
Avinash Raj
15ba5c6776
Updated to use ASGI v3 applications internally. ( #275 )
...
Used guarantee_single_callable().
Removed unneeded --asgi-protocol CLI option.
Updated tests.
Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
2020-10-27 19:50:50 +01:00
Samori Gorse
e1b77e930b
Added request body chunking ( #335 )
...
The entire body was previously read in memory which would lead
the server to be killed by the scheduler.
This change allows 8Kb chunks to be read until the entire body is
consummed.
Co-authored-by: Samori Gorse <samori@codeinstyle.io>
2020-10-21 16:38:03 +02:00
Michael K
b96720390f
Switch from Travis CI to GitHub Actions ( #336 )
...
* Add GitHub Actions
* Remove Travis CI
* Remove known first party from isort's config
2020-10-20 16:44:54 +02:00
Carlton Gibson
78be865eb4
Fixed #276 -- Ensured 500 response when app sends malformed headers. ( #281 )
2019-11-14 07:13:16 +01:00
Simon Willison
333f4644d1
Added support for raw_path in scope. ( #268 )
...
As per https://github.com/django/asgiref/pull/92
Required valid URI path fragments to be used in tests:
- Test case must ensure paths are correctly quoted before calling
run_daphne_request() & co.
Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
2019-07-03 20:22:03 +02:00
Mario Rodas
f46c2448b1
Added compatibility for hypothesis 4 ( #261 )
...
hypothesis `average_size` argument was already deprecated [1], and was
effectively removed in hypothesis 4 [2].
[1] https://github.com/HypothesisWorks/hypothesis/pull/1162
[2] https://hypothesis.readthedocs.io/en/latest/changes.html#v4-0-0
2019-06-17 10:10:14 +02:00
László Károlyi
20f2bc93d4
Add command-line options for proxy headers
2018-10-26 12:34:15 -07:00
Imblc
e93643ff5a
Fixed #229 : Allow bytes
headers only
...
Previously Daphne was too lax and would happily accept strings too.
2018-09-28 09:45:03 -07:00
Andrew Godwin
0ed6294406
Implement Black code formatting
2018-08-27 12:29:57 +10:00
Nick Sellen
2f94210321
Add x-forwarded-proto support ( #219 )
2018-07-24 13:25:03 -07:00
Andrew Godwin
84466d4ae4
Fixed #207 : Do header transforms for WebSocket XFF right
2018-05-26 12:16:07 +02:00
Andrew Godwin
446fc69408
Fixed #150 : Correctly handle bad querystrings
2018-03-04 09:48:33 -08:00
Andrew Godwin
853771ec95
Move testing to use multiprocessing for better reliability
...
We can also hopefully reuse this for LiveServerTestCase
2018-02-19 20:58:47 -08:00
Andrew Godwin
f53eb0dda6
Don't put commas in the header hypothesis tests
2018-02-07 14:15:28 -08:00
Andrew Godwin
13511d2ca6
Fixed #162 : Test suite now uses port 0 binding
2018-02-07 12:03:54 -08:00
Jonas Lidén
d46429247f
Unix socket fix ( #161 )
...
Fix error on listeners when passing a unix socket
2018-02-06 00:04:44 -08:00
Andrew Godwin
105e1d5436
Don't apply HTTP timeout to WebSocket connections!
2018-02-04 12:08:57 -08:00
Andrew Godwin
eb7468059d
Make Daphne process tests try harder.
2018-02-01 21:22:15 -08:00
Andrew Godwin
0572b1dbcd
Further improve flaky header tests
2018-02-01 21:18:13 -08:00
Andrew Godwin
db68c43de1
Fix imports and use of six
2018-02-01 21:02:37 -08:00
Andrew Godwin
51c2de3f8c
Fix header matching in websocket tests
2018-02-01 21:02:27 -08:00
Andrew Godwin
b287a74236
Make test port selection less flaky
2018-02-01 20:32:08 -08:00
Andrew Godwin
26fa870540
Move to "body" everywhere in HTTP messages
2017-11-29 21:27:24 -08:00
Andrew Godwin
3358767814
Increase hypothesis deadlines for slower systems/Travis
2017-11-29 00:03:29 -08:00
Andrew Godwin
7f5fe7370f
Add flake8 linting
2017-11-28 23:42:35 -08:00
Andrew Godwin
08e7841718
Fix import ordering
2017-11-28 18:03:29 -08:00
Andrew Godwin
20ff8fec28
Match to the new ASGI-HTTP spec.
2017-11-28 17:28:35 -08:00
Andrew Godwin
7fb3e9a167
Clean up comments, names and imports
2017-11-27 00:02:37 -08:00
Andrew Godwin
567c27504d
Add websocket tests to make sure everything important is covered.
2017-11-27 00:00:34 -08:00
Andrew Godwin
1ca1c67032
Add HTTP response test suite
2017-11-26 00:06:23 -08:00
Andrew Godwin
e0e60e4117
Full HTTP request test suite
2017-11-25 23:19:27 -08:00
Andrew Godwin
b72349d2c1
HTTP protocol tests
2017-11-25 18:23:54 -08:00
Andrew Godwin
0626f39214
Unify all strings to double quotes
2017-11-25 13:41:38 -08:00
Andrew Godwin
22aa56e196
Start on fixing tests
2017-11-25 13:39:46 -08:00