Commit Graph

748 Commits

Author SHA1 Message Date
Andrew Godwin
364d1e45b4 Remove last websocket.send enforcing references 2017-04-25 13:43:34 -07:00
Krukov D
fa413af053 Improvements for test client (#613)
* Tests for httpclient sending content

* Testing ordered consumers

* Added docs

* Added testing for ordering

* Added GET params at HttpClient

* Remove blank line

* Fix py3 bites

* Test Client now support ChannelSocketException

* Fix flake and isort

* Conflict resolution
2017-04-18 20:18:28 -07:00
Krukov D
b7ea0b9287 Rename HTTPClient to WSClient (#609)
This is what it was actually intended as. HTTP testing methods may follow later.
2017-04-17 09:21:10 -07:00
Krukov D
a0cbccfebc Remove encode/decode overhead at binding (#611) 2017-04-16 09:45:29 -07:00
Krukov D
585c093352 Remove unnecessary line (#610) 2017-04-16 09:27:56 -07:00
Artem Malyshev
5e96e3c176 Mention RabbitMQ layer in the docs. (#608) 2017-04-14 17:42:19 -07:00
Artem Malyshev
5445d317fd Provide TEST_CONFIG alias. (#604)
Allows (well, forces) a different channel layer configuration in testing.
2017-04-12 14:51:41 -07:00
Artem Malyshev
5648da5d34 Provide a way to disable static files serving in the live server test case. (#603)
This allows it to be turned off (it's on by default)
2017-04-12 14:01:25 -07:00
Sachin Rekhi
31cd68c89b Delay server will now requeue messages for later when gets ChannelFull exception (#600)
It re-delays them for one second each time rather than dropping them.
2017-04-11 10:25:56 +01:00
Artem Malyshev
db1b3ba951 Add ChannelLiveServerTestCase (#497)
Adds a new test case base class that fires up a live Daphne server and workers for the test case to use, like Django's LiveServerTestCase.
2017-04-11 10:17:47 +01:00
Daniel Hepper
7383280776 Added a decorator that checks origin headers (#593)
Adds a new allowed_hosts_only decorator and extensible base class to allow for checking the incoming Origin header on WebSocket requests, using the Django `ALLOWED_HOSTS` setting by default.
2017-04-07 15:05:34 +02:00
Asif Saifuddin Auvi
4063ac03ed Added 1.11 to tox (#596) 2017-04-07 12:06:34 +02:00
Asif Saifuddin Auvi
9266521f94 Added django 1.11 to travis matrix (#597) 2017-04-07 12:06:26 +02:00
Andrew Godwin
5f7e76141c Actually releasing 1.1.3 2017-04-07 04:35:37 +01:00
Andrew Godwin
64e0470b76 Releasing 1.1.3 2017-04-05 15:00:07 +02:00
Andrew Godwin
0e637e09a4 Add start of IRC client spec draft 2017-04-05 14:59:40 +02:00
Andrew Godwin
fe18d43064 Remove unused import 2017-04-05 13:07:32 +02:00
Andrew Godwin
ceeacdbfc3 Add explicit checks for asgi library versions
Refs daphne/#105
2017-04-05 12:56:43 +02:00
Artem Malyshev
c1f801a20e Improve docs. (#589) 2017-04-05 12:41:30 +02:00
Andrew Godwin
627b97c317 Fixed #588: enforce_ordering failed to wait on process-specific chans 2017-04-03 13:01:20 +02:00
Andrew Godwin
ba54268c19 Releasing 1.1.2 2017-04-01 15:38:38 +01:00
Mike Barkas
de65a41b54 Issue-579: Fix sentence grammar in documentation. (#580) 2017-03-28 14:00:53 -07:00
Mike Barkas
38bc238788 Issue-443: Adding session decorators to reference documentation. (#578) 2017-03-28 14:00:26 -07:00
Andrew Godwin
28ace41edf Fixed #577: Use scheme key from ASGI request message 2017-03-28 13:37:33 -07:00
Andrew Godwin
476d1500c6 Switch from MD5 to SHA-1 to work under FIPS-140-2 2017-03-28 11:38:05 -07:00
Andrew Godwin
294e60504e Add capacity note about process-local channels. 2017-03-28 10:08:23 -07:00
Andrew Godwin
bbff928152 Update ASGI spec with new process-local channels definition 2017-03-27 19:05:16 -07:00
Matt Magin
df22aa792c Fixed missing keyword argument in testing documentation (#574) 2017-03-27 11:43:14 -07:00
Andrew Godwin
1c5074d128 Specs should be very precise. 2017-03-27 10:06:38 -07:00
Andrew Godwin
a9062e5d28 Further clarify accept flow 2017-03-27 09:59:42 -07:00
Andrew Godwin
cf788a3d7d Allow accept to be False 2017-03-27 09:54:30 -07:00
Flavio Curella
0f0c74daaa Expose WebSocketBridge.socket (#572)
* made `WebSocketBridge._socket` public

We can provide a convenient way to hook custom behavior (such as debugging) by making the underlying `ReconnectingWebSocket` instance publicly available.

Also removed the undocumented `onopen` constructor option.

* recompile js
2017-03-24 15:33:55 -07:00
Erwin Junge
613153cbc6 Allow runworker to be used without staticfiles (#569)
* Allow runworker to be used without staticfiles

* Split too long line

* Reset binding_classes at start of runworker tests
2017-03-23 16:32:51 -07:00
Flavio Curella
10398780a3 Allow relative url in WebsocketBridge.connect() (#567)
* Add support for relative urls in javascript wrapper

* recompile static file

* add js smoke test for relative urls

* update docs to show relative urls
2017-03-23 16:30:28 -07:00
Erwin Junge
4323a64e33 Add python 3.6 checks (#571)
* Add python 3.6 checking to tox

* Add python 3.6 checking to travis
2017-03-23 14:14:15 -07:00
Flavio Curella
9f7fb7b80d remove spurious markdown formatting (#566) 2017-03-23 09:49:17 -07:00
Coread
08ff57ac9b Channel and http session from http (#564)
* Add a new auth decorator to get the user and rehydrate the http session

* Add http_user_and_session, taking precedence over http_user, applying the channel_and_http_session_user_from_http decorator (a superset of http user functionality)

* Only set session cookies on the first send, since subsequent real requests don't have access to HTTP information

* Add a test for new http_user_and_session WebsocketConsumer attribute

* Fix isort check
2017-03-22 15:58:35 -07:00
Andrew Godwin
526ad65e73 A couple more spec tweaks 2017-03-19 12:32:43 -07:00
Andrew Godwin
1f2538f5b8 Few more spec clarifications 2017-03-19 12:26:20 -07:00
Andrew Godwin
528cd89f4e Rearrange ASGI specs into a proper split of messaging/protocols 2017-03-19 12:17:13 -07:00
Andrew Godwin
274a5a8c98 Releasing 1.1.1 2017-03-19 11:23:28 -07:00
Andrew Godwin
08881bc7de Releasing 1.1.0 2017-03-18 13:04:12 -07:00
Flavio Curella
63dc5f6651 add Channels WebSocket javascript wrapper (#544)
Adds a WebSocket wrapper which is both publishable to npm and importable directly for use with staticfiles/etc. Also has a new build process to make the latter file.
2017-03-14 15:08:04 -07:00
Erwin Junge
463d16f3f9 Make the channel_session decorator work on methods as well (#555) 2017-03-14 14:14:20 -07:00
Andrew Godwin
cad63451f8 Expand more on accepting connections 2017-03-12 21:03:44 -07:00
Maik Hoepfel
13c1fcb654 Proposal for minor spec changes (#554)
* Webserver -> web server

This was flagged by my spell check, and indeed it's hard to find
spellings online without the space. The Oxford Dictionary only knows it
with a space, so I thought it's worth correcting.

* Attempt to clarify optional keys

I wasn't sure about how to treat keys marked optional. After having
spoken to Andrew, this is my attempt at clarifying. Improvements
welcome!

* Order of header values MUST be kept

Order for HTTP header values matters, both in request and responses. So
we must make sure that we're keeping it.

Request:
> Some headers, such as Accept-Language can be sent by clients as
> several headers each with a different value rather than sending the
> header as a comma separated list.

http://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpServletRequest.html#getHeaders%28java.lang.String%29

Response:
Set-Cookie may be present multiple times, and only the last given value
is to be used.

I'm updating the Daphne test to verify the order in my pull request
there.

* Clarify that headers is a list of lists

The wording for 'server'/'client' and 'headers' was very similar, and I
was unsure if clients may be a list of lists (in anticipation of
protocols supporting that). I hope this small tweak makes it clearer
that only headers is a list of lists.
2017-03-07 23:05:28 -08:00
Doug Keen
2101f285cb Allow custom json encoder and decoder in JsonWebsocketConsumer (#535)
Lets you override the JSON encoding on both the consumer and the multiplexer.
2017-02-28 18:51:48 -08:00
Andrew Godwin
ef6d526359 Add note about installing Redis 2017-02-25 18:12:32 -08:00
Andrew Godwin
c14caede51 Start working on 1.1.0 release notes 2017-02-23 18:01:28 -08:00
Andrew Godwin
b2842f1ef1 Fixed #542: Don't use staticfiles handler if staticfiles is not installed 2017-02-23 17:52:07 -08:00