Skip to content

Releases: Torxed/slimHTTP

v1.0.1rc7

07 Oct 21:57
Compare
Choose a tag to compare
v1.0.1rc7 Pre-release
Pre-release

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

v1.0.1rc6

07 Oct 11:13
Compare
Choose a tag to compare
v1.0.1rc6 Pre-release
Pre-release

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

v1.0.1rc5

16 Jul 10:23
Compare
Choose a tag to compare
v1.0.1rc5 Pre-release
Pre-release

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)

v1.0.1rc4

15 Jul 06:47
Compare
Choose a tag to compare
v1.0.1rc4 Pre-release
Pre-release

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.

v1.0.1rc3-1

14 Jul 08:54
Compare
Choose a tag to compare
v1.0.1rc3-1 Pre-release
Pre-release

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.

v1.0.1rc1

12 Jul 16:10
Compare
Choose a tag to compare
v1.0.1rc1 Pre-release
Pre-release

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

New feature: large payloads

26 Jun 18:58
d877c43
Compare
Choose a tag to compare
Pre-release

Some new features:

  • Support for large HTTP payloads (thanks to self sacrificing HTTP_REQUEST)
  • New example using discord.py integrated with slimHTTP to form a unison. So showcase the use of slimHTTP together with other libraries mainly using asyncio. Altho slimHTTP isn't asyncio in the traditional sense since it's thread safe, it works together with those libraries as well.
  • Events.convert() which can convert an event INT to a readable string. (Kinda crude but it works, I'm pretty sure heh)
  • HTTP_RESPONSE.build() now tries to accurately read the Content-Type in order to semi-parse the responding data and transform it into bytes in a non-intrusive way if possible. (No errorhandling here yet tho..)
  • HTTP_SERVER now supports addr = :str and port = :int parameters instead of config = :dict, as these variables are needed pre-startup in order to spin up the socket.bind() operation and can there for not wait for @http.configuration handler being set up.

Minor fixes:

  • HTTP_REQUEST.request_payload have no changed name to HTTP_REQUEST.payload, same goes for HTTP_REQUEST.headers.
  • A new event to support partially received content: Events.CLIENT_DATA_FRAGMENTED
  • Proper (?) termination of HTTP requests, as the server some times forgot to close sockets properly and delete them from the self.pollobj.
  • Added some more documentation

v1.0-beta.001

26 Jun 13:09
Compare
Choose a tag to compare
v1.0-beta.001 Pre-release
Pre-release

First stable beta release candidate of the minimal web server.
There's some kinks to be sorted out and probably a lot of unknowns, but this release seams to work in a basic sense with a few bug fixes since the alpha release.

v1.0-alpha

20 Jun 23:39
4215405
Compare
Choose a tag to compare
v1.0-alpha Pre-release
Pre-release

Usage is simple enough that it's time to release a v1.0.
It supports most basic needs, but for sure not all of them.

Tested integration with spiderWeb who's name I should probably rename.

Some key milestones:

  • Cross platform support (sounds silly, but the use of select.epoll() made this tricky)
  • Works great with WebSockets thanks to spiderWeb
  • REST lookalike behavior (ignores headers, just checks the path/url)
  • Response headers are a bit easier to set with:
@http.route('/hellowWorld.html')
def api_helloWorld(request):
	return slimhttpd.HTTP_RESPONSE(headers={'Content-Type' : 'text/html'},
 					payload=b'<html><body>Test</body></html>')

Auto-generation of self signed certificates have been prepared, but not yet fully turned on. And there's a bunch of tests that has to be done prior to an actual release party.