Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/django/middleware/common.py
Commit message (Collapse)AuthorAgeFilesLines
* Fixed #25302 -- Prevented BrokenLinkEmailsMiddleware ↵Maxime Lorant2015-08-251-3/+10
| | | | from reporting 404s when Referer = URL.
* Fixed #24935 -- Refactored common conditional GET handling.Denis Cornehl2015-08-151-14/+9
|
* Fixed #24720 -- Avoided resolving URLs that don't end in ↵Jay Cox2015-07-311-32/+53
| | | | | | a slash twice in CommonMiddleware. This speeds up affected requests by about 5%.
* Fixed #25017 -- Allowed customizing the ↵sujayskumar2015-06-271-7/+2
| | | | DISALLOWED_USER_AGENTS response
* Fixed #24681 -- Removed Unicode bug in ↵Oliver A Bristow2015-04-211-1/+1
| | | | BrokenLinkEmailMiddleware
* Fixed #19910 -- Added slash to i18n redirect if ↵Bas Peschier2015-03-261-18/+4
| | | | | | | | APPEND_SLASH is set. This introduces a force_append_slash argument for request.get_full_path() which is used by RedirectFallbackMiddleware and CommonMiddleware when handling redirects for settings.APPEND_SLASH.
* Fixed #23960 -- Removed http.fix_location_headerClaude Paroz2015-03-181-1/+1
| | | | Thanks Carl Meyer for the report and Tim Graham for the review.
* Sorted imports with isort; refs #23860.Tim Graham2015-02-061-4/+3
|
* Fixed #24145 -- Added PUT & PATCH to CommonMiddleware ↵Samuel Colvin2015-01-291-5/+5
| | | | APPEND_SLASH redirect error.
* Fixed #23531 -- Added ↵Berker Peksag2014-11-041-1/+6
| | | | CommonMiddleware.response_redirect_class.
* Removed settings.SEND_BROKEN_LINK_EMAILS per deprecation ↵Tim Graham2014-03-211-8/+0
| | | | timeline.
* Fixed #21188 -- Introduced subclasses for ↵Claude Paroz2014-03-081-1/+2
| | | | | | | to-be-removed-in-django-XX warnings Thanks Anssi Kääriäinen for the idea and Simon Charette for the review.
* Fixed E125 pep8 warningsChristopher Medrela2013-11-281-1/+1
|
* Fixed #7603 -- Added a 'scheme' property to the ↵Unai Zalakain2013-10-151-1/+1
| | | | | | | | | | | | | | | | | | | HttpRequest object `HttpRequest.scheme` is `https` if `settings.SECURE_PROXY_SSL_HEADER` is appropriately set and falls back to `HttpRequest._get_scheme()` (a hook for subclasses to implement) otherwise. `WSGIRequest._get_scheme()` makes use of the `wsgi.url_scheme` WSGI environ variable to determine the request scheme. `HttpRequest.is_secure()` simply checks if `HttpRequest.scheme` is `https`. This provides a way to check the current scheme in templates, for example. It also allows us to deal with other schemes. Thanks nslater for the suggestion.
* Advanced deprecation warnings for Django 1.7.Aymeric Augustin2013-06-291-1/+1
|
* Replaced `and...or...` constructs with PEP 308 ↵Ramiro Morales2013-05-271-1/+1
| | | | conditional expressions.
* Fixed #20099 -- Eased subclassing of ↵Claude Paroz2013-05-251-9/+15
| | | | | | | BrokenLinkEmailsMiddleware Thanks Ram Rachum for the report and the initial patch, and Simon Charette for the review.
* Fixed #20356 -- Prevented crash when HTTP_REFERER ↵Claude Paroz2013-05-181-1/+2
| | | | | | contains non-ascii Thanks srusskih for the report and Aymeric Augustin for the review.
* Fixed #19099 -- Split broken link emails out of common ↵Aymeric Augustin2013-01-151-32/+46
| | | | middleware.
* Removed IGNORABLE_404_STARTS/ENDS settings.Aymeric Augustin2012-12-291-14/+0
|
* Fixed #15152 -- Avoided crash of CommonMiddleware on ↵Aymeric Augustin2012-11-031-1/+12
| | | | broken querystring
* Fixed #7581 -- Added streaming responses.Aymeric Augustin2012-10-201-6/+10
| | | | Thanks mrmachine and everyone else involved on this long-standing ticket.
* Imported getLogger directly from logging moduleClaude Paroz2012-09-201-2/+3
| | | | This was a remainder of some 2.4 compatibility code.
* Fixed #18042 -- Advanced deprecation warnings.Aymeric Augustin2012-05-031-4/+2
| | | | Thanks Ramiro for the patch.
* Fixed #17734 -- Made sure to only redirect translated ↵Jannis Leidel2012-03-021-17/+2
| | | | | | URLs if they can actually be resolved to prevent unwanted redirects. Many thanks to Orne Brocaar and Anssi Kääriäinen for input. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17621 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #17358 -- Updated logging calls to use official ↵Jannis Leidel2012-02-091-1/+1
| | | | | | syntax for arguments instead of string interpolation. Thanks, spulec. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17480 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #16705 - Made the test client adhere to the WSGI ↵Aymeric Augustin2011-10-061-1/+1
| | | | | | spec -- in particular, removed the assumption that environ['QUERY_STRING'] exists. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16933 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Made some small tweaks/fixes to documentation from ↵Adrian Holovaty2011-05-241-2/+2
| | | | | | IGNORABLE_404_URLS changeset [16160] git-svn-id: http://code.djangoproject.com/svn/django/trunk@16275 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #15954 - New IGNORABLE_404_URLS setting that ↵Luke Plant2011-05-051-7/+17
| | | | | | | | | | | | allows more powerful filtering of 404s to ignore Thanks to aaugustin for implementing this. (Technically this doesn't fix the original report, as we've decided against having *any* default values, but the new feature makes it possible, and the docs have an example addressing #15954). git-svn-id: http://code.djangoproject.com/svn/django/trunk@16160 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Removed a bunch more Python 2.4 workarounds now that we ↵Adrian Holovaty2011-03-281-2/+2
| | | | | | don't support that version. Refs #15702 -- thanks to jonash for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15927 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #15635 -- Converted two legacy old-style raise ↵Adrian Holovaty2011-03-261-2/+2
| | | | | | statements. Thanks, DaNmarner git-svn-id: http://code.djangoproject.com/svn/django/trunk@15917 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #15187 -- Ensure that missing page emails aren't ↵Russell Keith-Magee2011-01-301-1/+1
| | | | | | sent when running under debug. Thanks to Dan Carroll for the report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15363 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed sending mail on 404s to fail silently.Luke Plant2011-01-041-1/+2
| | | | | | A failure in the e-mail system should not turn a 404 into a 500. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15145 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #14559 -- corrected some typos and misleading ↵Alex Gaynor2010-11-021-1/+1
| | | | | | docstrings. Thanks to Gabriel Hurley for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14441 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #14406 -- Added a Python 2.4 compatibility to the ↵Russell Keith-Magee2010-10-061-2/+2
| | | | | | logging interface. Thanks to Łukasz Rekucki for the report, and to Luke Plant for original patch this was based on. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13989 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #12012 -- Added support for logging. Thanks to ↵Russell Keith-Magee2010-10-041-0/+10
| | | | | | Vinay Sajip for his draft patch, and to the many people who gave feedback during development of the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13981 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #6228: Changed common middleware to respect ↵Karen Tracey2010-03-071-4/+5
| | | | | | request-specific urlconf. Thanks trey, skevy, and mikexstudios. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12704 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Removed an 'assert False' I stupidly committed in [12165]Adrian Holovaty2010-01-101-2/+0
| | | | git-svn-id: http://code.djangoproject.com/svn/django/trunk@12166 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #6094 -- Middleware exceptions are now caught by ↵Adrian Holovaty2010-01-101-0/+2
| | | | | | the core handler. Thanks, isagalaev git-svn-id: http://code.djangoproject.com/svn/django/trunk@12165 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #9199 -- We were erroneously only prepending "www" ↵Malcolm Tredinnick2008-10-071-23/+35
| | | | | | | | | | | to the domain if we also needed to append a slash (when PREPEND_WWW=True). Based on a patch and tests from gonz. Thanks. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9184 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #7379: fixed a subtle corner case involving URL ↵Jacob Kaplan-Moss2008-08-271-1/+1
| | | | | | encoding in `CommonMiddleware` git-svn-id: http://code.djangoproject.com/svn/django/trunk@8635 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #8381 -- Fixed a problem with appending slashes in ↵Malcolm Tredinnick2008-08-211-2/+2
| | | | | | | | | | | the common middleware when SCRIPT_NAME contains something other than '/'. Patch from jcassee. Also fixed the middleware tests to work with this patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8456 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #7919 -- md5 and sha modules are deprecated since ↵Gary Wilson Jr2008-08-021-3/+3
| | | | | | Python 2.5, use hashlib module when available. Patch from Karen Tracey. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8193 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #7228 -- Fixed our ETag header creation to meet ↵Adrian Holovaty2008-06-161-1/+1
| | | | | | the HTTP spec, by quoting it. Thanks, skjohn@us.ibm.com git-svn-id: http://code.djangoproject.com/svn/django/trunk@7659 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #3228 -- Added new APPEND_SLASH handling behaviour ↵Malcolm Tredinnick2007-12-031-15/+43
| | | | | | in the common middleware. Makes customisation a bit easier. Thanks, Mihai Preda and Andy Gayton. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6852 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #5762 -- Quoted the portions that make up the URL ↵Malcolm Tredinnick2007-10-201-4/+6
| | | | | | | | | when appending "www." or adding a trailing slash in common middleware. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6553 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Added a get_host() method to HttpRequest. There is still ↵Malcolm Tredinnick2007-09-151-2/+2
| | | | | | an http.get_host() version in place, so this is fully backwards compatible. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6296 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #4994 -- Send back set-cookie headers in "not ↵Malcolm Tredinnick2007-08-121-0/+2
| | | | | | modified" responses. Well spotted, colin@owlfish.com. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5878 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #4484 -- Fixed APPEND_SLASH handling to handle an ↵Malcolm Tredinnick2007-07-131-1/+1
| | | | | | | | | empty path value. Thanks, VesselinK. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5688 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Changed ETag computation to first check if an ETag ↵Malcolm Tredinnick2007-06-171-2/+6
| | | | | | | | | header already exists in the response. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5483 bcc190cf-cafb-0310-a4f2-bffc1f526a37