- Rough preliminary support for using ssl for requests.
- Add "Content-Length: 0" header if no body is present on the request.
- Changed the signature of
add_endpointso that the user can just pass a port, instead of an ugly('localhost', port)tuple, when creating an endpoint. - Added the ability for the user to specify a default handler for a Deproxy via
the
default_handlerparameter to__init__. - Added the ability for the user to specify a default handler for a specific
endpoint via the
default_handlerparameter toadd_endpoint. - Added the ability for the user to specify separate handlers for each endpoint
via the
handlersparameter tomake_request. - Renamed the
make_requestmethod'shandler_functionparameter todefault_handler. - Renamed the
MessageChainclass'shandlertodefault_handler, to avoid confusion with the newhandlersattribute. - Renamed the built-in
default_handlerfunction tosimple_handlerto avoid confusion. - Renamed the
delayfunction'shandler_functionparameter tonext_handlerand made it optional, defaulting tosimple_handler. - Stringified parameters to
RequestandResponse. They are always converted to strings now. Also made some of them optional. - Fixes to
route. It's still not 100%, though.
There are several breaking changes to method signatures. Upgrading existing tests to use v0.7 will be tedious, but not difficult.
- Added a class,
HeaderCollection, to hold request and response headers instead of using adict. The new class is a hybrid of a dictionary and a list of tuples. It supports case-insensitive lookup and storing multiple values for headers with the same name. - Updated reading of simple message bodies. It doesn't yet support chunked transfers or encodings, but it's far more useful.
- Re-organized the codebase from a multi-file package into a single module.
- Fixed the logic when adding default headers so that they are recorded in the handlings as well.
- Added option to
make_requestto not add default request headers - Added option to handler functions to not add default response headers