Commit Graph

16 Commits

Author SHA1 Message Date
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
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
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
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
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
Andrew Godwin
84466d4ae4 Fixed #207: Do header transforms for WebSocket XFF right 2018-05-26 12:16:07 +02:00
Andrew Godwin
105e1d5436 Don't apply HTTP timeout to WebSocket connections! 2018-02-04 12:08:57 -08:00
Andrew Godwin
0572b1dbcd Further improve flaky header tests 2018-02-01 21:18:13 -08:00
Andrew Godwin
51c2de3f8c Fix header matching in websocket tests 2018-02-01 21:02:27 -08:00
Andrew Godwin
7f5fe7370f Add flake8 linting 2017-11-28 23:42: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