v1.0.1rc3-1
Pre-releaseNew features:
-
vhost
in configuration now supports one new (and one stub) function. if avhost
configuration contains"module" : "/path/script.py"
, that script will be imported and executed upon each request (no caching for now). It has two "lookups" in terms of module function, one beingon_request
which will be used as the default for each request to thatvhost
. Unless@slimHTTP.instances['addr:port'].route('/', vhost='example.com')
is specified, which will override the default handleron_request
. If none of the two are found, the module is simply just executed as-is and whatever is in there will act as a normal Python script. -
HTTPS support - better late than never. HTTPS is tested without
PyOpenSSL
which is an optional enhancement to slimHTTP. Mockup function to simulate the function calls toPyOpenSSL
has been created, so a direct replacement ofssl
toPyOpenSSL.SSL
should be possible. -
index_file
no longer have precedence over@app.route
definitions, those definitions there for no longer require/index.html
at the end, and routes can be either@app.route('/')
or@app.route('/index.html')
- but the later will not be auto-redirected if the client doesn't specify it.
Fixes
This commit also addresses issue #8. But extensive testing hasn't been done.