Slimhttp

Latest version: v1.0.1rc7

Safety actively analyzes 682532 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

1.0.1rc31

New features:
=========

* `vhost` in configuration now supports one new *(and one stub)* function. if a `vhost` 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 being `on_request` which will be used as the default for each request to that `vhost`. Unless `slimHTTP.instances['addr:port'].route('/', vhost='example.com')` is specified, which will override the default handler `on_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 to `PyOpenSSL` has been created, so a direct replacement of `ssl` to `PyOpenSSL.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.

1.0.1rc7

Minor fixes
=======

* Tweaked the error handling a bit
* Condensed the `.py` support into one class called `Imported()` to centralize the handling of absolute imports via paths
* Made it so that both `proxy` and `module` modes breaks the execution flow if present, ensures that 8 doesn't happen *(hopefully)*.
* Cleaned up some iterator logic *(mismatch between how objects were yielded up the chain)*
* Fixed the `Content-Range` logic, as it was broken

1.0.1rc6

New features
==========

* Added support for `Transport-Encoding: chunked` (Chunked transfers for large files via `STREAM_CHUNKED` class file delivery)

Minor fixes
========

* Moved `run()` logic to HTTP base class instead of HTTPS.
* Fixed websocket `Upgrade` logic a bit
* Added some more data events and restructured them a bit
* Added a JSON serializer
* Fixed VHOST definition/cofinfugration some times referencing the default config

1.0.1rc5

New features:
=========

* Reverse proxy support *(with optional flag for TLS)* which fixes 7
* `CLIENT_RESPONSE_PROXY_DATA` event for whenever response data comes from a proxy, and not slimHTTP directly.
* The index file `/<index file>` is no longer automatically appended for any request that ends with `/`, it's only done on static file delivery mode. Meaning `.route('/')` will not become `.route('/index.html')` before calling the route function. *(was actually fixed in the previous rc4 but not mentioned properly)*

1.0.1rc4

New features:
=========

* `module` mode for `vhosts` added.
* `proxy` mode stub function added to make it easier to implement in the future.
* A more complete documentation has been added.

Fixes
====

* `index` logic moved to not interfere with the modules etc.

1.0.1rc1

Not much that is new, mainly just prep work for pypi so we can do `pip install slimHTTP`.

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.