…t worker reloading.
Added a try/except block to catch NotImplementedErrors for platforms that don't support urandom.
https://bugzilla.redhat.com/show_bug.cgi?id=488396 fix issue #168. Thanks!
Validate models before allowing connections via gunicorn_django This prevents issues where the site is accepting connections but not all of the models have loaded yet. If your model importing has side effects (monkey-patching, etc) this can results in errors about missing attributes or features simply because the code that enables those features as not been run yet. This issue does not affect the "run_gunicorn" management command as that performs it's own model validation before allowing connections, so we are simply making this consistent here. Signed-off-by: Chris Lamb <firstname.lastname@example.org>
in the form of aaaa:aaaa:... . Thanks to zauberpony for first implementation of the patch.
* We were missing some obvious classifiers for HTTP and WSGI
* Remove logging call in worker subclasses and rely on the logging in Worker.handle_error to do the proper logging.
* Always log the exception locally * Still only pass the exception in the HTTP response if debug is turned on. * Slight cosmetic changes to the actual HTML of the error response.
* Transfer-Encoding header was not being set. * Whether a connection should close should depend on whether we are able to continue accepting requests.
We were testing for None and using a default value of -1.
content-length is provided and http version >= 1.1. In other case send until we content is empty. Also HTTP don't expect we can send more than content-length if header is set, so discard any content if we have already send the expected lenghth. (spotted by @GrahamDumpleton) reviewed and OK by @davisp. More readable function by @davisp