Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/django/http
Commit message (Collapse)AuthorAgeFilesLines
* Fixed #25576 -- Added IOBase methods required by ↵Jon Dufresne2015-10-211-0/+6
| | | | TextIOWrapper to HttpResponse.
* Fixed #24496 -- Added CSRF Referer checking against ↵Matt Robenolt2015-09-161-9/+2
| | | | | | | CSRF_COOKIE_DOMAIN. Thanks Seth Gottlieb for help with the documentation and Carl Meyer and Joshua Kehn for reviews.
* Fixed #25099 -- Fixed crash in AdminEmailHandler on ↵Vlastimil Zíma2015-09-041-2/+21
| | | | DisallowedHost.
* Fixed #25331 -- Removed trailing blank lines in docstrings.Maxime Lorant2015-08-312-3/+0
|
* Fixed #25254 -- Added JsonResponse json_dumps_params ↵Sambhav Satija2015-08-121-2/+6
| | | | parameter.
* Fixed #25211 -- Added HttpRequest.get_port() and ↵Matt Robenolt2015-08-041-1/+9
| | | | USE_X_FORWARDED_PORT setting.
* Refs #24121 -- Added meaningful repr() to HttpResponse ↵Keryn Knight2015-07-151-0/+23
| | | | and subclasses.
* Fixed #25099 -- Cleaned up HttpRequest representations ↵Vlastimil Zíma2015-07-142-49/+1
| | | | in error reporting.
* Sorted imports in __init__.py files.Tim Graham2015-06-271-7/+9
|
* Refs #23763 -- Fixed Python 3.5 ↵Tim Graham2015-06-171-6/+9
| | | | | | | PendingDeprecationWarning in LazyStream. Fixed "PendingDeprecationWarning: generator 'LazyStream.read.<locals>.parts' raised StopIteration" per PEP 0479.
* Removed unnecessary arguments in .get method callsPiotr Jakimiak2015-05-131-1/+1
|
* Fixed #19910 -- Added slash to i18n redirect if ↵Bas Peschier2015-03-261-2/+3
| | | | | | | | 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-182-16/+3
| | | | Thanks Carl Meyer for the report and Tim Graham for the review.
* Fixed #24139 -- Changed HttpResponse.reason_phrase to ↵Jon Dufresne2015-03-131-5/+13
| | | | evaluate based on status_code.
* Fixed #24463 -- Removed mod_python functionality from ↵Rik2015-03-111-5/+5
| | | | HttpRequest._get_scheme()
* Fixed #20889 -- Prevented BadHeaderError when Python ↵Claude Paroz2015-02-191-2/+3
| | | | | | | | | inserts newline Workaround for http://bugs.python.org/issue20747. In some corner cases, Python 2 inserts a newline in a header value despite `maxlinelen` passed in Header constructor. Thanks Tim Graham for the review.
* Sorted imports with isort; refs #23860.Tim Graham2015-02-064-12/+15
|
* Fixed #24240 -- Allowed GZipping a Unicode ↵Matthew Somerville2015-02-031-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | StreamingHttpResponse make_bytes() assumed that if the Content-Encoding header is set, then everything had already been dealt with bytes-wise, but in a streaming situation this was not necessarily the case. make_bytes() is only called when necessary when working with a StreamingHttpResponse iterable, but by that point the middleware has added the Content-Encoding header and thus make_bytes() tried to call bytes(value) (and dies). If it had been a normal HttpResponse, make_bytes() would have been called when the content was set, well before the middleware set the Content-Encoding header. This commit removes the special casing when Content-Encoding is set, allowing unicode strings to be encoded during the iteration before they are e.g. gzipped. This behaviour was added a long time ago for #4969 and it doesn't appear to be necessary any more, as everything is correctly made into bytes at the appropriate places. Two new tests, to show that supplying non-ASCII characters to a StreamingHttpResponse works fine normally, and when passed through the GZip middleware (the latter dies without the change to make_bytes()). Removes the test with a nonsense Content-Encoding and Unicode input - if this were to happen, it can still be encoded as bytes fine.
* Fixed #24137 -- Switched to HTTP reason phrases from ↵Jon Dufresne2015-01-281-66/+2
| | | | Python stdlib.
* Fixed #24209 -- Prevented crash when parsing malformed ↵Raul Cumplido2015-01-271-1/+2
| | | | | | RFC 2231 headers Thanks Tom Christie for the report and review.
* Closed files in FileResponse; refs #24072Collin Anderson2015-01-051-0/+2
|
* Fixed #24072 -- Added FileResponse for streaming binary ↵Collin Anderson2015-01-052-3/+24
| | | | files.
* Fixed #23977 -- Added setdefault() method to HttpResponseSergey Parkhomenko2014-12-111-0/+5
|
* Fixed #23968 -- Replaced list comprehension with ↵Jon Dufresne2014-12-081-2/+2
| | | | generators and dict comprehension
* Removed unused variable ↵Matt Robenolt2014-11-241-1/+0
| | | | django.http.request.absolute_http_url_re
* Fixed #12098 -- Simplified HttpRequest.__repr__().Berker Peksag2014-11-201-1/+5
|
* Fixed #23730 -- Moved support for SimpleCookie ↵Tim Graham2014-11-122-12/+19
| | | | | | | | HIGHEST_PROTOCOL pickling to http.cookie. This fix is necessary for Python 3.5 compatibility (refs #23763). Thanks Berker Peksag for review.
* Fixed #18523 -- Added stream-like API to HttpResponse.Michael Kelly2014-11-031-2/+26
| | | | | | | Added getvalue() to HttpResponse to return the content of the response, along with a few other methods to partially match io.IOBase. Thanks Claude Paroz for the suggestion and Nick Sanford for review.
* Fixed #18456 -- Added path escaping to ↵Unai Zalakain2014-11-031-2/+4
| | | | HttpRequest.get_full_path().
* Fixed #23397 -- Stripped whitespace from base64 during ↵Jason Hobbs2014-09-131-6/+11
| | | | | | | chunking This insures the actual base64 content has a length a multiple of 4. Also added a test case for the failure.
* Limited lines to 119 characters in django/Tim Graham2014-09-051-2/+7
| | | | refs #23395.
* Fixed #10190 -- Made HttpResponse charset customizable.Unai Zalakain2014-08-191-7/+26
| | | | | Thanks to Simon Charette, Aymeric Augustin, and Tim Graham for reviews and contributions.
* Fixed #22996 -- Prevented crash with unencoded query stringClaude Paroz2014-08-191-3/+11
| | | | | Thanks Jorge Carleitao for the report and Aymeric Augustin, Tim Graham for the reviews.
* Fixed #23295 -- Removed unnecessary fix_location_header ↵Collin Anderson2014-08-151-1/+1
| | | | request.get_host() check.
* Fixed #22971 -- Properly parsed RFC 2388 encoded headersClaude Paroz2014-08-141-0/+13
| | | | | Thanks homm for the report, Cea Stapleton for patch improvements and Ian Cordasco, Christian Schmitt and Tim Graham for the review.
* Fixed #19802 -- Fixed HttpResponse.set_cookie() with ↵qingfeng2014-08-031-1/+2
| | | | | | unicode data on Python 2. Thanks django at patrickbregman.eu for the report.
* Added a space before explanation of "Invalid HTTP_HOST ↵Daniel Hahler2014-07-061-2/+2
| | | | header: ..."
* Fixed #22799 -- Made GET and POST on HttpRequest ↵Duncan Parkes2014-06-251-1/+6
| | | | | | | | | | | | | | | QueryDicts, and FILES a MultiValueDict. Previously, GET, POST, and FILES on an HttpRequest were created in the __init__ method as dictionaries. This was not something you would usually notice causing trouble in production as you'd only see a WSGIRequest, but in testing using the test client, calling .getlist on GET, POST, or FILES for a request with no get/post data resulted in an AttributeError. Changed GET and POST on an HttpRequest object to be mutable QueryDicts (mutable because the Django tests, and probably many third party tests, were expecting it).
* Fixed #22897 -- Made QueryDict query_string argument ↵Duncan Parkes2014-06-251-1/+1
| | | | | | optional. Now QueryDict() is equivalent to QueryDict('') or QueryDict(None).
* Improved documentation for QueryDict.Duncan Parkes2014-06-251-3/+10
|
* Added HTTP 308 status and its description.Yazhong Liu2014-06-201-0/+1
|
* Fixed #22680 -- I/O operation on closed file.Florian Apolloner2014-06-112-0/+16
| | | | | | | This patch is two-fold; first it ensure that Django does close everything in request.FILES at the end of the request and secondly the storage system should no longer close any files during save, it's up to the caller to handle that -- or let Django close the files at the end of the request.
* Fixed #18314 -- Corrected request.build_absolute_uri() ↵Unai Zalakain2014-06-071-8/+19
| | | | | | | | | | | handling of paths starting with // ``HttpRequest.build_absolute_uri()`` now correctly handles paths starting with ``//``. ``WSGIRequest`` now doesn't remove all the leading slashes either, because ``http://test/server`` and http://test//server`` aren't the same thing (RFC2396). Thanks to SmileyChris for the initial patch.
* Fixed typo in multipartparser.pymbacho2014-05-161-1/+1
|
* Dropped fix_IE_for_vary/attach.Aymeric Augustin2014-05-142-58/+2
| | | | This is a security fix. Disclosure following shortly.
* Fix many many typos in comments throughout the codebaseAlex Gaynor2014-04-261-2/+2
|
* Replaced urllib/urlparse imports with from ↵Tim Graham2014-03-312-9/+2
| | | | django.utils.six.moves.
* Fixed many typos in comments and docstrings.Rodolfo Carvalho2014-03-032-5/+5
| | | | Thanks Piotr Kasprzyk for help with the patch.
* Fixed #17942 -- Added a JsonResponse class to more ↵Lukasz Balcerzak2014-02-152-3/+27
| | | | | | | easily create JSON encoded responses. Thanks leahculver for the suggestion and Erik Romijn, Simon Charette, and Marc Tamlyn for the reviews.
* Fixed typo in docstring.Martin Matusiak2014-01-161-1/+1
|