setting self.LISTENER to None is not enough because self.WORKERS also have references to it
the possibility to manage an access log compatible with apache combined log format. reopening files is also handled. Also, this change fix issues #237 and #190. For the sake of simplicity logging file have been removed --logfile option has become --error-logfile, by default "-" Following options have been added: --access-logfile, the access log file path. By default None. If set access logs will bre written to defined output eg: $ gunicorn -w3 --access-logfile=- test:app 2011-08-21 19:36:52  [INFO] Starting gunicorn 0.13.0 2011-08-21 19:36:52  [INFO] Listening at: http://127.0.0.1:8000 (84572) 2011-08-21 19:36:52  [INFO] Using worker: sync 2011-08-21 19:36:52  [INFO] Booting worker with pid: 84573 2011-08-21 19:36:52  [INFO] Booting worker with pid: 84574 2011-08-21 19:36:52  [INFO] Booting worker with pid: 84575 127.0.0.1 - - [21/Aug/2011:19:37:04] "GET / HTTP/1.1" 200 14 "-" "curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8r zlib/1.2.5"
…uarantee there is no response body (hence no Content-Length defined) This can cause odd behavior with browsers not being able to parse the response correctly (not sure if this is just a property of empty chunked responses or something else)
`urlparse.urlparse` splits the url at semicolons and calls it params. Since the WSGI doesn't have any special treatment for params, they should be preserved and passed to the wsgi app. Using `urlparse.urlsplit` to avoid splitting the params.
StopIteration is simply propogated, so there's no reason to catch it. The catch-all exception is also caught and logged in handle(), but broken pipe errors are ignored. The redundant catch here was generating excess logging by calling handle_error for a broken pipe which fails to send the error because the client has already disconnected.
Instead of hardcoding X-Forwarded-Protocol and X-Forwarded-SSL, make the header and value configurable, with no default that would enable a client to spoof secure requests if the reverse proxy is not configured to strip the header used.
aren't correctly reloaded. First attempt to remove it from sys.modules introduced more problem than it solved. This new attempt, just get the module, reload it and populate currently loaded settings with new values.
…a worker class.
Its possible that when iterating Arbiter.WORKERS in manage_workers we get interupted to handle a SIGCHLD which will pop the child PID from the dict which results in a "dict changed size while iterating error. Reported on IRC. Simple fix is to just copy the dict into a list that we iterate.