summaryrefslogtreecommitdiff
path: root/django/http
AgeCommit message (Collapse)Author
2016-03-15Fixed #26158 -- Rewrote http.parse_cookie() to better match browsers.Collin Anderson
2016-03-14Simplified _cookie_allows_colon_in_names condition.Tim Graham
2016-03-14Removed a workaround for a cookie encoding bug [1] in Python < 2.7.2.Tim Graham
[1] http://bugs.python.org/issue9824
2016-03-07Fixed #26325 -- Made MultiPartParser ignore filenames that normalize to an ↵John-Mark Bell
empty string.
2016-02-10Fixed #26014 -- Added WSGIRequest content_type and content_params attributes.Curtis Maloney
Parsed the CONTENT_TYPE header once and recorded it on the request.
2016-01-25Fixed #26125 -- Fixed E731 flake warnings.userimack
2015-12-14Fixed #25725 -- Made HttpReponse immediately close objects.Johannes Hoppe
2015-11-18Fixed #25644 -- Fixed reset cookie expiry date bug.Raphael Merx
Setting a cookie with the same name as a previously deleted cookie would set its expiry date to 'Thu, 01-Jan-1970 00:00:00 GMT'.
2015-10-21Fixed #25576 -- Added IOBase methods required by TextIOWrapper to HttpResponse.Jon Dufresne
2015-09-16Fixed #24496 -- Added CSRF Referer checking against CSRF_COOKIE_DOMAIN.Matt Robenolt
Thanks Seth Gottlieb for help with the documentation and Carl Meyer and Joshua Kehn for reviews.
2015-09-04Fixed #25099 -- Fixed crash in AdminEmailHandler on DisallowedHost.Vlastimil Zíma
2015-08-31Fixed #25331 -- Removed trailing blank lines in docstrings.Maxime Lorant
2015-08-12Fixed #25254 -- Added JsonResponse json_dumps_params parameter.Sambhav Satija
2015-08-04Fixed #25211 -- Added HttpRequest.get_port() and USE_X_FORWARDED_PORT setting.Matt Robenolt
2015-07-15Refs #24121 -- Added meaningful repr() to HttpResponse and subclasses.Keryn Knight
2015-07-13Fixed #25099 -- Cleaned up HttpRequest representations in error reporting.Vlastimil Zíma
2015-06-27Sorted imports in __init__.py files.Tim Graham
2015-06-17Refs #23763 -- Fixed Python 3.5 PendingDeprecationWarning in LazyStream.Tim Graham
Fixed "PendingDeprecationWarning: generator 'LazyStream.read.<locals>.parts' raised StopIteration" per PEP 0479.
2015-05-13Removed unnecessary arguments in .get method callsPiotr Jakimiak
2015-03-26Fixed #19910 -- Added slash to i18n redirect if APPEND_SLASH is set.Bas Peschier
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.
2015-03-18Fixed #23960 -- Removed http.fix_location_headerClaude Paroz
Thanks Carl Meyer for the report and Tim Graham for the review.
2015-03-12Fixed #24139 -- Changed HttpResponse.reason_phrase to evaluate based on ↵Jon Dufresne
status_code.
2015-03-11Fixed #24463 -- Removed mod_python functionality from HttpRequest._get_scheme()Rik
2015-02-19Fixed #20889 -- Prevented BadHeaderError when Python inserts newlineClaude Paroz
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.
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2015-02-03Fixed #24240 -- Allowed GZipping a Unicode StreamingHttpResponseMatthew Somerville
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.
2015-01-28Fixed #24137 -- Switched to HTTP reason phrases from Python stdlib.Jon Dufresne
2015-01-27Fixed #24209 -- Prevented crash when parsing malformed RFC 2231 headersRaul Cumplido
Thanks Tom Christie for the report and review.
2015-01-05Closed files in FileResponse; refs #24072Collin Anderson
2015-01-05Fixed #24072 -- Added FileResponse for streaming binary files.Collin Anderson
2014-12-11Fixed #23977 -- Added setdefault() method to HttpResponseSergey Parkhomenko
2014-12-08Fixed #23968 -- Replaced list comprehension with generators and dict ↵Jon Dufresne
comprehension
2014-11-24Removed unused variable django.http.request.absolute_http_url_reMatt Robenolt
2014-11-20Fixed #12098 -- Simplified HttpRequest.__repr__().Berker Peksag
2014-11-12Fixed #23730 -- Moved support for SimpleCookie HIGHEST_PROTOCOL pickling to ↵Tim Graham
http.cookie. This fix is necessary for Python 3.5 compatibility (refs #23763). Thanks Berker Peksag for review.
2014-11-03Fixed #18523 -- Added stream-like API to HttpResponse.Michael Kelly
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.
2014-11-03Fixed #18456 -- Added path escaping to HttpRequest.get_full_path().Unai Zalakain
2014-09-13Fixed #23397 -- Stripped whitespace from base64 during chunkingJason Hobbs
This insures the actual base64 content has a length a multiple of 4. Also added a test case for the failure.
2014-09-05Limited lines to 119 characters in django/Tim Graham
refs #23395.
2014-08-19Fixed #10190 -- Made HttpResponse charset customizable.Unai Zalakain
Thanks to Simon Charette, Aymeric Augustin, and Tim Graham for reviews and contributions.
2014-08-19Fixed #22996 -- Prevented crash with unencoded query stringClaude Paroz
Thanks Jorge Carleitao for the report and Aymeric Augustin, Tim Graham for the reviews.
2014-08-15Fixed #23295 -- Removed unnecessary fix_location_header request.get_host() ↵Collin Anderson
check.
2014-08-14Fixed #22971 -- Properly parsed RFC 2388 encoded headersClaude Paroz
Thanks homm for the report, Cea Stapleton for patch improvements and Ian Cordasco, Christian Schmitt and Tim Graham for the review.
2014-08-03Fixed #19802 -- Fixed HttpResponse.set_cookie() with unicode data on Python 2.qingfeng
Thanks django at patrickbregman.eu for the report.
2014-07-05Added a space before explanation of "Invalid HTTP_HOST header: ..."Daniel Hahler
2014-06-24Fixed #22799 -- Made GET and POST on HttpRequest QueryDicts, and FILES a ↵Duncan Parkes
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).
2014-06-24Fixed #22897 -- Made QueryDict query_string argument optional.Duncan Parkes
Now QueryDict() is equivalent to QueryDict('') or QueryDict(None).
2014-06-24Improved documentation for QueryDict.Duncan Parkes
2014-06-20Added HTTP 308 status and its description.Yazhong Liu
2014-06-11Fixed #22680 -- I/O operation on closed file.Florian Apolloner
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.