- Preliminary HTTPS support.
- Read message bodies encoded with the "chunked" transfer-encoding.
- 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_endpoint
so 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_handler
parameter to__init__
. - Added the ability for the user to specify a default handler for a specific
endpoint via the
default_handler
parameter toadd_endpoint
. - Added the ability for the user to specify separate handlers for each endpoint
via the
handlers
parameter tomake_request
. - Renamed the
make_request
method'shandler_function
parameter todefault_handler
. - Renamed the
MessageChain
class'shandler
todefault_handler
, to avoid confusion with the newhandlers
attribute. - Renamed the built-in
default_handler
function tosimple_handler
to avoid confusion. - Renamed the
delay
function'shandler_function
parameter tonext_handler
and made it optional, defaulting tosimple_handler
. - Stringified parameters to
Request
andResponse
. 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_request
to not add default request headers - Added option to handler functions to not add default response headers