When the path starts with //, urlsplit considers it as a relative uri
while the RDF says it shouldnt (
http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html#sec5.1.2).
While I'm remove unncessary tests on netloc. The path never contains a
netloc or port.
- handle new way to launch applications in django 1.4
- simplify the way we discover the project path and settings
- add --pythonpath & --settings options for django applications
- still compatible with older versions (>=1.1)
-handle DJANGO_SETTINGS_MODULE env.
close#283, #275, #274, #241
Without this, tornado.web.Application instances could be used as
a gunicorn application, but running a standard wsgi callback under
the tornado worker would fail.
``self.wsgi`` is the property that may be a tornado.web.Application.
The transformed application, whether originally tornado.web.Application
or a WSGI callable, should be the argument to HTTPServer.
Also, it's probably poor form to be mutating the properties of ``self``
here when a local variable suffices.
The standard logger uses locking functions which are NOT guaranteed to
be re-entrant [1], so this could (potentially) result in deadlock or a
crash.
[1] http://docs.python.org/library/logging.html Section 15.7.8.
This prevents weird things from happening when log.critical is called
in a non-except context. Typically it would result in either 'None'
or the last exception being logged, neither of which is desirable.
When the signal.siginterrupt call is available it can be used to make
interrupted system calls (errno == EINTR) retry transparently whenever
they have not caused any side effects yet (e.g. no data read/written).
It should make shutdown more graceful.
Patch by Jonas Borgström