Fix error when err_handler doesn't return dict as response
Add support for content_based encoding