Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
An attempt to define SockJS protocol
Python CoffeeScript Makefile
branch: master

Merge pull request #79 from danbev/cors-fixes

Adding various fixes for CORS request/response handling
latest commit 6c6415ebdb
@brycekahle brycekahle authored
Failed to load latest commit information.
.gitignore Fix circular dep in Makefile. Still need venv in gitignore
Makefile Fix circular dep in Makefile. Still need venv in gitignore
README.md update sockjs implementation links
client.coffee Minor modifications to smoke test. Fix #4
common.coffee Minor modifications to smoke test. Fix #4
http-quirks.py Added missing import
httplib_fork.py Rename forked httplib to avoid confusion with python version of the l…
requirements.txt Switch to using standard practices for installing python packages.
requirements_dev.txt Switch to using standard practices for installing python packages.
smoke-test.coffee Minor modifications to smoke test. Fix #4
sockjs-protocol-0.1.py Version utils.py, to make previous 0.2.1 and 0.2 protocols runnable a…
sockjs-protocol-0.2.1.py Version utils.py, to make previous 0.2.1 and 0.2 protocols runnable a…
sockjs-protocol-0.2.py Version utils.py, to make previous 0.2.1 and 0.2 protocols runnable a…
sockjs-protocol-0.3.3.py Merge pull request #79 from danbev/cors-fixes
sockjs-protocol-0.3.py Merge pull request #55 from ngocdaothanh/patch-2
sockjs-protocol-dev.py Fix #81 CORS verify needs to follow spec
utils_02.py Version utils.py, to make previous 0.2.1 and 0.2 protocols runnable a…
utils_03.py Adding parentheses to clarify code.

README.md

SockJS family:

Work in progress:

SockJS-protocol

This project attempts to provide a definition of SockJS protocol. The documentation is in a form of a Python test suite decorated with some prose in literate-programming style. You can see current documentation here:

Running tests

You must have Python 2.X and virtualenv installed. You can install it via pip install virtualenv or sudo apt-get install python-virtualenv.

To run the test suite against your server, first checkout dependencies:

make test_deps

And you're ready to run the tests against your server. By default we assume that your test server is at http://localhost:8081:

./venv/bin/python sockjs-protocol-0.3.3.py

You can specify the test server URL manually:

SOCKJS_URL=http://localhost:1234 ./venv/bin/python sockjs-protocol-0.3.3.py -v

You can run specific tests providing test class as an optional argument:

./venv/bin/python sockjs-protocol-0.3.3.py Protocol.test_simpleSession

There is also another test, intended to look for some http quirks:

./venv/bin/python http-quirks.py -v

Generating literate html

If you edited sockjs-protocol*.py files, you may want to see how it looks rendered to html. To generate the html type:

make build

You should see generated html files in docs subdirectory.

If you see pygments.util.ClassNotFound, take a look here.

Something went wrong with that request. Please try again.