summaryrefslogtreecommitdiff
path: root/tests/responses
Commit message (Collapse)AuthorAgeFilesLines
* Fixed #34405 -- Fixed setting Content-Type header in FileResponse for ↵Mariusz Felisiak2023-03-141-0/+2
| | | | | compress and brotli. Thanks Chamal De Silva for the report.
* Removed hardcoded date in SetCookieTests.test_far_expiration().Bernhard M. Wiedemann2023-02-071-3/+10
| | | | Follow up to a92c83828785f12dcf90477413c2d04e1855fbb9.
* Fixed CVE-2022-36359 -- Escaped filename in Content-Disposition header.Carlton Gibson2022-08-031-0/+35
| | | | Thanks to Motoyasu Saburi for the report.
* Refs #32365 -- Removed internal uses of utils.timezone.utc alias.Carlton Gibson2022-03-241-4/+5
| | | | | Remaining test case ensures that uses of the alias are mapped canonically by the migration writer.
* Fixed #33567 -- Avoided setting default text/html content type on responses.Claude Paroz2022-03-091-2/+4
|
* Refs #33562 -- Made HttpResponse.set_cookie() raise ValueError when both ↵Luke Plant2022-03-071-0/+8
| | | | | | | "expires" and "max_age" are passed. This fixes the case where you might pass set_cookie(expires=val, max_age=val) and max_age is silently ignored.
* Fixed #33562 -- Made HttpResponse.set_cookie() support timedelta for the ↵Luke Plant2022-03-071-0/+5
| | | | max_age argument.
* Refs #33476 -- Reformatted code with Black.django-bot2022-02-073-156/+188
|
* Refs #30509 -- Adjusted FileResponse test to close file earlier.Piotr Kunicki2021-10-141-1/+2
|
* Fixed #30509 -- Made FileResponse better handle buffers and non-zero file ↵Piotr Kunicki2021-10-141-6/+76
| | | | offsets.
* Refs #30509 -- Increased FileResponse test coverage.Piotr Kunicki2021-10-141-22/+86
| | | | Split tests by behavior, e.g. header, and added additional tests.
* Refs #24121 -- Added __repr__() to StreamingHttpResponse and subclasses.Nicolas Restrepo2021-06-221-0/+7
|
* Fixed #32366 -- Updated datetime module usage to recommended approach.Nick Pope2021-05-121-2/+2
| | | | | | | - Replaced datetime.utcnow() with datetime.now(). - Replaced datetime.utcfromtimestamp() with datetime.fromtimestamp(). - Replaced datetime.utctimetuple() with datetime.timetuple(). - Replaced calendar.timegm() and datetime.utctimetuple() with datetime.timestamp().
* Fixed #31789 -- Added a new headers interface to HttpResponse.Tom Carrick2020-09-142-19/+28
|
* Fixed #31982 -- Made HttpResponse.set_cookie() cast max_age argument to an ↵Hasan Ramezani2020-09-051-0/+5
| | | | integer.
* Fixed #31790 -- Fixed setting SameSite and Secure cookies flags in ↵Mariusz Felisiak2020-07-161-0/+12
| | | | | | | | HttpResponse.delete_cookie(). Cookies with the "SameSite" flag set to None and without the "secure" flag will be soon rejected by latest browser versions. This affects sessions and messages cookies.
* Changed `'%s' % value` pattern to `str(value)`.Nick Pope2020-05-041-1/+1
|
* Capitalized Unicode in docs, strings, and comments.Jon Dufresne2020-04-201-1/+1
|
* Reverted "Fixed #30565 -- Closed HttpResponse when wsgi.file_wrapper closes ↵Florian Apolloner2020-02-111-49/+0
| | | | | | file-like object." This reverts commit cce47ff65a4dd3786c049ec14ee889e128ca7de9.
* Fixed #30862 -- Allowed setting SameSite cookies flags to 'none'.Osaetin Daniel2019-12-121-1/+4
| | | | Thanks Florian Apolloner and Carlton Gibson for reviews.
* Used more specific unittest assertions in tests.Nick Pope2019-10-291-1/+1
| | | | | | | | | | | | * assertIsNone()/assertIsNotNone() instead of comparing to None. * assertLess() for < comparisons. * assertIs() for 'is' expressions. * assertIsInstance() for isinstance() expressions. * rounding of assertAlmostEqual() for round() expressions. * assertIs(..., True/False) instead of comparing to True/False. * assertIs()/assertIsNot() for ==/!= comparisons. * assertNotEqual() for == comparisons. * assertTrue()/assertFalse() instead of comparing to True/False.
* Fixed #30565 -- Closed HttpResponse when wsgi.file_wrapper closes file-like ↵Chris Jerdonek2019-06-201-0/+49
| | | | object.
* Fixed #30196 -- Made FileResponse set Content-Disposition inline if filename ↵ShingenPizza2019-05-171-0/+9
| | | | is available.
* Made a requests test that will fail in 2028 fail 10 years later.Bernhard M. Wiedemann2019-02-141-2/+2
| | | 2038 is chosen for compatibility with 32-bit systems.
* Fixed #30137 -- Replaced OSError aliases with the canonical OSError.Jon Dufresne2019-01-281-3/+3
| | | | Used more specific errors (e.g. FileExistsError) as appropriate.
* Refs #16470 -- Fixed typo in a FileResponse test.James Aylett2018-09-011-1/+1
|
* Fixed #16470 -- Allowed FileResponse to auto-set some Content headers.Claude Paroz2018-05-151-0/+73
| | | Thanks Simon Charette, Jon Dufresne, and Tim Graham for the reviews.
* Fixed #27863 -- Added support for the SameSite cookie flag.Alex Gaynor2018-04-131-0/+11
| | | Thanks Alex Gaynor for contributing to the patch.
* Fixed #28989 -- Fixed HttpResponse.delete_cookie() for cookies that use ↵Alvin Lindstam2018-01-081-0/+13
| | | | __Secure/Host prefixes.
* Moved HttpResponse.set_cookie() tests to an appropriate location.Tim Graham2018-01-081-0/+93
|
* Refs #23919 -- Removed encoding preambles and future importsClaude Paroz2017-01-181-4/+0
|
* Fixed #27640 -- Fixed HttpResponse's __repr__() without a 'Content-Type' ↵roboslone2016-12-271-0/+5
| | | | header.
* Fixed #27153 -- Added validation for HttpResponse status.Ryan Allen2016-08-301-2/+22
|
* Refs #26022 -- Used context manager version of assertRaises in tests.Hasan2016-01-291-1/+2
|
* Fixed #25725 -- Made HttpReponse immediately close objects.Johannes Hoppe2015-12-141-0/+11
|
* Fixed #25576 -- Added IOBase methods required by TextIOWrapper to HttpResponse.Jon Dufresne2015-10-211-0/+9
|
* Refs #24121 -- Added meaningful repr() to HttpResponse and subclasses.Keryn Knight2015-07-151-0/+5
|
* Fixed #24139 -- Changed HttpResponse.reason_phrase to evaluate based on ↵Jon Dufresne2015-03-121-0/+6
| | | | status_code.
* Fixed #24137 -- Switched to HTTP reason phrases from Python stdlib.Jon Dufresne2015-01-281-3/+3
|
* Fixed #23977 -- Added setdefault() method to HttpResponseSergey Parkhomenko2014-12-111-0/+14
|
* Fixed #18523 -- Added stream-like API to HttpResponse.Michael Kelly2014-11-031-1/+24
| | | | | | | 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 #10190 -- Made HttpResponse charset customizable.Unai Zalakain2014-08-191-2/+52
| | | | | Thanks to Simon Charette, Aymeric Augustin, and Tim Graham for reviews and contributions.
* Removed superfluous models.py files.Aymeric Augustin2013-12-171-0/+0
| | | | | | | Added comments in the three empty models.py files that are still needed. Adjusted the test runner to add applications corresponding to test labels to INSTALLED_APPS even when they don't have a models module.
* Fixing E302 ErrorsJason Myers2013-11-021-0/+1
| | | | Signed-off-by: Jason Myers <jason@jasonamyers.com>
* Fixed #12747 -- Made reason phrases customizable.Aymeric Augustin2013-05-193-0/+15