Commit Graph

111 Commits

Author SHA1 Message Date
Claude Paroz e6065c7b83 Fixed #25619 -- Made runserver serve with HTTP 1.1 protocol
Thanks Tim Graham for the review.
2017-02-23 09:04:53 +01:00
Anton Samarchyan 5a6f70b428 Refs #27656 -- Updated django.core docstring verbs according to PEP 257. 2017-02-21 11:58:42 -05:00
Claude Paroz d4b00c5c24 Removed WSGIServer.server_bind() identical to parent version
The method customization was removed in 2ca00faa91.
2017-02-11 11:16:35 +01:00
Nadège Michel bece837829 Fixed #20238 -- Added threading support to LiveServerTestCase. 2017-02-09 19:08:32 -05:00
Vytis Banaitis 8838d4dd49 Refs #23919 -- Replaced kwargs.pop() with keyword-only arguments. 2017-02-01 11:41:56 -05:00
chillaranand d6eaf7c018 Refs #23919 -- Replaced super(ClassName, self) with super(). 2017-01-25 12:23:46 -05:00
Claude Paroz 6e55e1d88a Refs #23919 -- Replaced six.reraise by raise 2017-01-22 20:08:04 +01:00
Tim Graham d170c63351 Refs #23919 -- Removed misc references to Python 2. 2017-01-21 20:02:00 -05:00
Claude Paroz 042b7350a0 Refs #23919 -- Removed unneeded str() calls 2017-01-20 14:13:55 +01:00
Simon Charette 9695b14982 Refs #23919 -- Removed str() conversion of type and method __name__. 2017-01-19 11:31:07 -05:00
Simon Charette cecc079168 Refs #23919 -- Stopped inheriting from object to define new style classes. 2017-01-19 08:39:46 +01:00
Claude Paroz 2b281cc35e Refs #23919 -- Removed most of remaining six usage
Thanks Tim Graham for the review.
2017-01-18 21:33:28 +01:00
Claude Paroz d7b9aaa366 Refs #23919 -- Removed encoding preambles and future imports 2017-01-18 09:55:19 +01:00
David Sanders e5e3747357 Fixed #27705 -- Added protocol/server_cls attributes to runserver for extensibility. 2017-01-09 10:41:33 -05:00
Claude Paroz 48c34f3336 Fixed #26971 -- Prevented crash with non-UTF-8 incoming PATH_INFO
Thanks Tim Graham and Loïc Bistuer for the reviews.
2016-08-23 22:40:07 +02:00
Flavio Curella 0bc5cd6280 Fixed #25684 -- Made runserver use logging for request/response output.
Thanks andreif for the contributing to the patch.
2016-01-11 07:35:17 -05:00
Marten Kenbeek c87540cee5 Fixed #26011 -- Prevented random LiveServerTestCase test failures on Windows.
Prevented LiveServerTestCase from stealing ports used by concurrent
processes on Windows.
2015-12-31 10:57:03 -05:00
Tim Graham 1a76257b1b Fixed #25204 -- Added missing space in runserver logging. 2015-08-01 08:01:24 -04:00
Alex Vidal e467919c63 Fixed typo in django.core.servers.basehttp message. 2015-02-19 19:31:49 -05:00
Tim Graham bbe28496d3 Removed old import aliases. 2015-02-05 19:37:01 -05:00
Tim Graham 41f0d3d3bc Removed FastCGI support per deprecation timeline; refs #20766. 2015-01-17 08:32:31 -05:00
Carl Meyer 316b8d4974 Stripped headers containing underscores to prevent spoofing in WSGI environ.
This is a security fix. Disclosure following shortly.

Thanks to Jedediah Smith for the report.
2015-01-13 13:03:05 -05:00
Andreas Pelme 4ee06ec3fc Fixed #24069 -- Made ServerHandler a new style class to fix super() call. 2015-01-02 08:51:28 -05:00
Matthew Somerville 9253042d53 Fixed #4444 - Made runserver suppress 'broken pipe' errors
One handler in WSGIServer, to catch the error when raised from
SocketServer.BaseServer's finish_request, and one in WSGIRequestHandler
(by creating a subclass of ServerHandler), to catch the error when
raised in wsgiref.handlers.BaseHandler's finish_response.
2014-11-28 10:51:15 -05:00
Anubhav Joshi 10b17a22be Fixed #19508 -- Implemented uri_to_iri as per RFC.
Thanks Loic Bistuer for helping in shaping the patch and Claude Paroz
for the review.
2014-10-16 02:31:17 +07:00
Flavio Curella c53f2451a8 Fixed #23398 -- Added helpful error message when runserver is accessed via HTTPS 2014-09-09 12:29:30 -04:00
Moayad Mardini 4f72e5f03a Fixed #21773 -- made daemon threads default in the development server.
Thanks clime for the report.
2014-06-05 12:26:24 -04:00
Alex Gaynor 1dcc603eff Fixed several typos in Django 2014-05-28 17:39:14 -07:00
Ramiro Morales 9a982d5ccc Moved ServerHandler helper class to tests.
It has been only used in the builtin_servers tests since Django 1.4.
2014-03-30 20:55:40 -03:00
Berker Peksag 5d263dee30 Fixed #21674 -- Deprecated the import_by_path() function in favor of import_string().
Thanks Aymeric Augustin for the suggestion and review.
2014-02-08 11:12:19 -05:00
Claude Paroz e7383f16b4 Fixed #14800 -- Suppressed WSGIRequestHandler message filtering
Filtering out static file requests in runserver has been judged
arbitrary and can hide some debugging-related activity.
Thanks Roy Smith for the report and Aymeric Augustin for the
review.
2013-11-09 16:23:14 +01:00
Alex Gaynor 7548aa8ffd More attacking E302 violators 2013-11-02 13:12:09 -07:00
Tim Graham 36ded01527 Fixed #21302 -- Fixed unused imports and import *. 2013-11-02 15:24:56 -04:00
Florian Apolloner 2ca00faa91 Fixed "Address already in use" from liveserver.
Our WSGIServer rewrapped the socket errors from server_bind into
WSGIServerExceptions, which is used later on to provide nicer
error messages in runserver and used by the liveserver to see if
the port is already in use. But wrapping server_bind isn't enough since
it only binds to the socket, socket.listen (which is called from
server_activate) could also raise "Address already in use".

Instead of overriding server_activate too I chose to just catch socket
errors, which seems to make more sense anyways and should be more robust
against changes in wsgiref.
2013-09-22 22:02:59 +02:00
Aymeric Augustin 6a6428a36f Took advantage of django.utils.six.moves.urllib.*. 2013-09-05 14:39:23 -05:00
Claude Paroz fdd7a355bf Deprecated django.utils.importlib
This was a shim for pre-Python 2.7 support.
2013-07-29 17:10:22 +02:00
Aymeric Augustin 4ff682c1ba Fixed #18336 -- Doubled request_queue_size.
This reduces random failures to load static files with Google Chrome.
2013-04-28 10:47:07 +02:00
Matthew Wood a7960bcb35 Fixed #18972 -- Refactored bundled wsgi server's chunking algorithm.
Thanks to amosonn at yahoo.com for the report, @doda for the initial patch and
@datagrok for the revamped logic and test case.
2013-03-20 18:46:26 -04:00
konarkmodi bc4111ba68 Fixed #18003 -- Preserved tracebacks when re-raising errors.
Thanks jrothenbuhler for draft patch, Konark Modi for updates.
2013-03-19 15:42:39 -07:00
Claude Paroz 7c5b244826 Fixed #17061 -- Factored out importing object from a dotted path
Thanks Carl Meyer for the report.
2013-02-04 16:38:25 +01:00
Aymeric Augustin a53c474026 Fixed #16241 -- Ensured the WSGI iterable's close() is always called.
Thanks Graham Dumpleton for the report.
2012-12-31 12:45:20 +01:00
Claude Paroz 3e98d98b69 Prevented host resolution when running dev server
Refs #19075, #2494.
Thanks Karen Tracey for spotting the issue.
2012-11-03 20:12:24 +01:00
Claude Paroz 681550ca6d Removed custom WSGIRequestHandler.get_environ
We probably historically customized it for good reasons, but
currently, the differences with upstream Python are not
significant any longer.
Also fixes #19075 for which a test has been added.
2012-10-20 13:55:13 +02:00
Aymeric Augustin d739d531a1 [py3] Fixed a regression introduced in fcc8de0598.
Thanks George Marshall for the report.
2012-08-16 22:04:50 +02:00
Aymeric Augustin fcc8de0598 [py3] Ported django.core.servers. 2012-08-16 13:01:16 +02:00
Aymeric Augustin ca07fda2ef [py3] Switched to Python 3-compatible imports.
xrange/range will be dealt with in a separate commit due to the huge
number of changes.
2012-07-22 09:29:56 +02:00
Aymeric Augustin 0d914d08a0 [py3] Updated urllib/urllib2/urlparse imports.
Lots of functions were moved. Use explicit imports in all cases
to keey it easy to identify where the functions come from.
2012-07-22 09:29:55 +02:00
Claude Paroz 91727c76cd Cleaned up WSGIRequestHandler get_environ to be Python 3 compatible
headers.type/typeheader attributes are gone in Python 3. Thanks
Vinay Sajip for the inspiration of his Python 3 branch.
2012-05-18 19:40:41 +02:00
Claude Paroz 865cd35c9b Made more extensive usage of context managers with open. 2012-05-05 14:06:36 +02:00
Claude Paroz 596cb9c7e2 Replaced print statement by print function (forward compatibility syntax). 2012-04-30 20:45:03 +02:00