Changed pecan to more gracefully handle a few odd request encoding edge cases. Now pecan applications respond with an HTTP 400 (rather than an uncaught UnicodeDecodeError, resulting in an HTTP 500) when:
- HTTP POST requests are composed of non-Unicode data
- Request paths contain invalid percent-encoded characters, e.g., /some/path/%aa/
Improved verbosity for import-related errors in pecan configuration files, especially those involving relative imports.
- For HTTP POSTs, map JSON request bodies to controller keyword arguments.
- Improved argspec detection and leniency for wrapped controllers.
- When path arguments are incorrect for RestController, return HTTP 404, not 400.
- When detecting non-content for HTTP 204, properly catch UnicodeDecodeError.
- Fixed a routing bug for generic subcontrollers.
- Fixed a bug in generic function handling when context locals are disabled.
- Fixed a bug that mixes up argument order for generic functions.
- Removed assert for flow control; it can be optimized away with python -O.