| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
TextIOWrapper to HttpResponse.
|
|
|
|
|
|
|
| |
CSRF_COOKIE_DOMAIN.
Thanks Seth Gottlieb for help with the documentation and
Carl Meyer and Joshua Kehn for reviews.
|
|
|
|
| |
DisallowedHost.
|
| |
|
|
|
|
| |
parameter.
|
|
|
|
| |
USE_X_FORWARDED_PORT setting.
|
|
|
|
| |
and subclasses.
|
|
|
|
| |
in error reporting.
|
| |
|
|
|
|
|
|
|
| |
PendingDeprecationWarning in LazyStream.
Fixed "PendingDeprecationWarning: generator 'LazyStream.read.<locals>.parts'
raised StopIteration" per PEP 0479.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Thanks Carl Meyer for the report and Tim Graham for the review.
|
|
|
|
| |
evaluate based on status_code.
|
|
|
|
| |
HttpRequest._get_scheme()
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Python stdlib.
|
|
|
|
|
|
| |
RFC 2231 headers
Thanks Tom Christie for the report and review.
|
| |
|
|
|
|
| |
files.
|
| |
|
|
|
|
| |
generators and dict comprehension
|
|
|
|
| |
django.http.request.absolute_http_url_re
|
| |
|
|
|
|
|
|
|
|
| |
HIGHEST_PROTOCOL pickling to http.cookie.
This fix is necessary for Python 3.5 compatibility (refs #23763).
Thanks Berker Peksag for review.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
HttpRequest.get_full_path().
|
|
|
|
|
|
|
| |
chunking
This insures the actual base64 content has a length a multiple of 4.
Also added a test case for the failure.
|
|
|
|
| |
refs #23395.
|
|
|
|
|
| |
Thanks to Simon Charette, Aymeric Augustin, and Tim Graham
for reviews and contributions.
|
|
|
|
|
| |
Thanks Jorge Carleitao for the report and Aymeric Augustin, Tim Graham
for the reviews.
|
|
|
|
| |
request.get_host() check.
|
|
|
|
|
| |
Thanks homm for the report, Cea Stapleton for patch improvements
and Ian Cordasco, Christian Schmitt and Tim Graham for the review.
|
|
|
|
|
|
| |
unicode data on Python 2.
Thanks django at patrickbregman.eu for the report.
|
|
|
|
| |
header: ..."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
| |
optional.
Now QueryDict() is equivalent to QueryDict('') or QueryDict(None).
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
This is a security fix. Disclosure following shortly.
|
| |
|
|
|
|
| |
django.utils.six.moves.
|
|
|
|
| |
Thanks Piotr Kasprzyk for help with the patch.
|
|
|
|
|
|
|
| |
easily create JSON encoded responses.
Thanks leahculver for the suggestion and Erik Romijn,
Simon Charette, and Marc Tamlyn for the reviews.
|
| |
|