You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Jessie Murray ea01d687b5
Apply ACL rules to WebSocket commands
ACLs were not considered when processing commands coming over WebSocket
connections. WS commands that are disabled with ACLs are now rejected
with a custom message for JSON and raw WS clients, the two supported
formats for this protocol. For JSON an equivalent HTTP status code is
included in the response, although this is only an indication of how
Webdis would have responded if it came from a regular HTTP request.

Tests are added to validate that DEBUG commands are rejected by Webdis
without even making it to Redis, for both JSON and raw WS clients.

Add DEBUG OBJECT demo to websocket.html: DEBUG is disabled with ACLs
by default in webdis.json. A DEBUG button is added to the WebSocket
HTML demo to show what kind of response is produced when WebSocket
clients attempt to send such a command.

The error responses are documented in the README in the ACL section.

Fixes #240.
12 months ago
..
Makefile Add progress thread w/ custom interval for WS test 3 years ago
README.tests README for tests. 14 years ago
basic.py Add test for etag header on GET 1 year ago
bench.sh Minor cleanup of bench.sh 1 year ago
curl-tests.sh Add test with curl for empty header (#217) 3 years ago
limits.py Fix ResourceWarning in limits.py 3 years ago
pubsub.c Clean up empty indented lines 4 years ago
requirements.txt Add Python-based WebSockets tests 3 years ago
websocket.c Large refactoring of WS code 3 years ago
websocket.html Apply ACL rules to WebSocket commands 12 months ago
ws-tests.py Apply ACL rules to WebSocket commands 12 months ago

README.tests

This directory contains a few test programs for Webdis:

* basic.py:	Unit tests.
* bench.sh:	Benchmark of several functions.
* pubsub (run `make' to compile): Tests pub/sub channels; run `./pubsub -h` for options.
* websocket (run `make' to compile): Tests HTML5 WebSockets; run `./websocket -h` for options.