summaryrefslogtreecommitdiff
path: root/django/http/__init__.py
AgeCommit message (Collapse)Author
2022-11-14Fixed #34074 -- Added headers argument to RequestFactory and Client classes.David Wobrock
2022-05-17Fixed #33683 -- Document HttpResponseBase and allow import from django.httpCollin Anderson
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2016-04-25Fixed #26052 -- Moved conditional_content_removal() processing to the test ↵Tim Graham
client.
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-03-18Fixed #23960 -- Removed http.fix_location_headerClaude Paroz
Thanks Carl Meyer for the report and Tim Graham for the review.
2015-01-05Fixed #24072 -- Added FileResponse for streaming binary files.Collin Anderson
2014-05-14Dropped fix_IE_for_vary/attach.Aymeric Augustin
This is a security fix. Disclosure following shortly.
2014-02-14Fixed #17942 -- Added a JsonResponse class to more easily create JSON ↵Lukasz Balcerzak
encoded responses. Thanks leahculver for the suggestion and Erik Romijn, Simon Charette, and Marc Tamlyn for the reviews.
2013-11-02Fixed #21302 -- Fixed unused imports and import *.Tim Graham
2013-10-08Fixed #16822 -- Added RawPostDataExceptionTim Graham
Thanks jaylett for the patch.
2013-06-29Removed compatibility code for streaming responses.Aymeric Augustin
This code provided a deprecation path for old-style streaming responses. Refs #6527, #7581.
2012-10-21Cleaned up the the http module. Moved all of the code from __init__.py to ↵Alex Gaynor
request.py, response.py and utils.py
2012-10-20Fixed #7581 -- Added streaming responses.Aymeric Augustin
Thanks mrmachine and everyone else involved on this long-standing ticket.
2012-10-20Fixed #5611 -- Restricted accepted content types in parsing POST dataClaude Paroz
Thanks paulegan for the report and Preston Holmes for the review.
2012-10-17Fixed a security issue related to password resetsPreston Holmes
Full disclosure and new release are forthcoming
2012-09-07Fixed #18916 -- Allowed non-ASCII headers.Aymeric Augustin
Thanks Malcolm Tredinnick for the review.
2012-08-30Replaced some smart_xxx by force_xxx equivalentClaude Paroz
smart_str/smart_text should only be used when a potential lazy string should be preserved in the result of the function call.
2012-08-29Replaced many smart_bytes by force_bytesClaude Paroz
In all those occurrences, we didn't care about preserving the lazy status of the strings, but we really wanted to obtain a real bytestring.
2012-08-23Fixed #18678 -- HttpResponse init arguments allowed for subclassesClaude Paroz
Thanks hp1337@gmail.com for the report.
2012-08-22Fixed #11340 -- Prevented HttpResponseNotModified to have content/content-typeClaude Paroz
The HTTP 1.1 spec tells that the 304 response MUST NOT contain a message body. Thanks aparajita for the report.
2012-08-22Used the decorator syntax for properties in django.httpClaude Paroz
2012-08-19[py3] Fixed another regression from 2892cb0ec4.Aymeric Augustin
2012-08-19[py3] Fixed regression introduced in 536b030363.Aymeric Augustin
Refs #18764. Reverted 536b030363 and switched to a more explicit way of avoiding calling bytes(<int>). This definitely deserves a refactoring. Specifically, _get_content should just return b''.join(self). Unfortunately that's impossible with the current tests.
2012-08-19[py3] Supported integers in HttpResponseAymeric Augustin
Fixed #18764.
2012-08-15[py3] Fixed HTTP header serializationClaude Paroz
2012-08-14[py3] Fixed HttpResponse when initialized with bytesClaude Paroz
2012-08-14[py3] Ported django.http according to PEP 3333.Aymeric Augustin
Perfomed some style cleanup while I was in the area.
2012-08-13[py3] Fixed contrib.formtools testsClaude Paroz
2012-08-13[py3] Fixed iterlists usage in QueryDictClaude Paroz
2012-08-11[py3] Used smart_str to prevent regressions in http handlingClaude Paroz
2012-08-11[py3] Fixed Python 3 compatibility of http handlingClaude Paroz
* Using str() when Python 2 expects bytes and Python 3 Unicode * Fixed reraise-ing syntax * Fixed slicing of byte strings
2012-08-09[py3] Renamed `next` to `__next__` in iterators.Aymeric Augustin
See PEP 3114. `next` is retained as an alias for Python 2.
2012-08-08[py3] Fixed 'iterable but non string' detectionClaude Paroz
In Python 3, the str type has an __iter__ attribute. Therefore, the presence of an __iter__ attribute is not sufficient to distinguish 'standard' iterables (list, tuple) from strings.
2012-08-07[py3] Made a small fix in django.http.Aymeric Augustin
This is necessary for the 'utils' tests to pass.
2012-08-07[py3] Ported django.utils.encoding.Aymeric Augustin
* Renamed smart_unicode to smart_text (but kept the old name under Python 2 for backwards compatibility). * Renamed smart_str to smart_bytes. * Re-introduced smart_str as an alias for smart_text under Python 3 and smart_bytes under Python 2 (which is backwards compatible). Thus smart_str always returns a str objects. * Used the new smart_str in a few places where both Python 2 and 3 want a str.
2012-08-03Replaced some byte strings by str() callsClaude Paroz
This is a useful trick when Python 2 awaits byte strings and Python 3 Unicode (regular) strings.
2012-07-30Fixed a security issue in http redirects. Disclosure and new release ↵Florian Apolloner
forthcoming.
2012-07-22[py3] Switched to Python 3-compatible imports.Aymeric Augustin
xrange/range will be dealt with in a separate commit due to the huge number of changes.
2012-07-22[py3] Updated urllib/urllib2/urlparse imports.Aymeric Augustin
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[py3] Replaced unicode/str by six.text_type/bytes.Aymeric Augustin
2012-07-22[py3] Used six.reraise wherever necessary.Aymeric Augustin
2012-07-17Fixed #18561 -- Made HttpResponse.tell() support non-ascii charsClaude Paroz
2012-07-14Cleaned up the QueryDict implementation.Alex Gaynor
- Use super(). - Don't poke at internals. - Don't override methods for no reason.
2012-06-30Fixed #16519 -- Deprecated mimetype kwarg of HttpResponse __init__Claude Paroz
This keyword was already deprecated in the code (supported for backwards compatibility only), but never formally deprecated. Thanks Paul McMillan for the report and yasar11732 for the initial patch.
2012-06-07Fixed #18269 -- Applied unicode_literals for Python 3 compatibility.Claude Paroz
Thanks Vinay Sajip for the support of his django3 branch and Jannis Leidel for the review.
2012-05-19Marked bytestrings with b prefix. Refs #18269Claude Paroz
This is a preparation for unicode literals general usage in Django (Python 3 compatibility).
2012-05-10Replaced foo.next() by next(foo).Claude Paroz
This new syntax for next() has been introduced in Python 2.6 and is compatible with Python 3.
2012-05-05Replaced cStringIO.StringIO by io.BytesIO.Claude Paroz
Also replaced StringIO.StringIO by BytesIO in some other appropriate places. StringIO is not available in Python 3.