Commit Graph

35 Commits

Author SHA1 Message Date
Jannis Leidel 7cb140e6d8 Fixed #16003 -- Restored compatibility of the admin when using USE_ETAGS. Thanks for the initial patch, pterk.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16729 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-08 13:25:31 +00:00
Russell Keith-Magee 6cd9023635 Fixed #15499 -- Ensure that cache control headers don't try to set public and private as a result of multiple calls to patch_cache_control with different arguments. Thanks to AndiDog for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16657 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-23 03:51:10 +00:00
Jannis Leidel 24f4764a48 Fixed #16225 -- Removed unused imports. Many thanks to Aymeric Augustin for the work on the patch and Alex for reviewing.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16539 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-13 09:35:51 +00:00
Adrian Holovaty 13864703bc Removed a bunch more Python 2.4 workarounds now that we don't support that version. Refs #15702 -- thanks to jonash for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15927 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-28 02:11:19 +00:00
Jannis Leidel f6c991667f Fixed #4992 -- Respect the GET request query string when creating cache keys. Thanks PeterKz and guettli for the initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15705 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-02 12:47:36 +00:00
Carl Meyer 00fda7f45d Fixed #13283 -- Corrected CACHE_MIDDLEWARE_ANONYMOUS_ONLY's bad habit of setting Vary: Cookie on all responses and destroying cache efficiency. Thanks to natrius for the fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15381 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-01 00:20:31 +00:00
Russell Keith-Magee b22415214a Beefed up the tests for multi-cache handling of the cache middleware and view decorators, and made a couple of tweaks for edge cases as a result.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15021 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-22 07:52:44 +00:00
Jannis Leidel dad28e8557 Fixed #14103 -- Take USE_ETAGS setting into account when patching the response headers. Thanks, trbs and Eric Holscher.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14885 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-12 22:57:17 +00:00
Honza Král cb17f7ca22 Fixed #14560 -- Enable HEAD requests to be cached properly. Thanks, codemonkey!
Introducing ability to cache HEAD requests and GET requests separately by
adding the method to the cache key while preserving the functionality that HEAD
requests can use cached reponses generated by a GET request.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14391 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-29 01:31:15 +00:00
Jannis Leidel 284e7e3cbd Refined changes made in r12546 to also respect the request.LANGUAGE_CODE in case the LocaleMiddleware is used to discover the language preference.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12624 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-01 10:19:01 +00:00
Jannis Leidel 2164e138e3 Fixed #5691 - Adds the active language to the cache key. Thanks, Antoni Aloy, Ramiro Morales and Yann Malet.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12546 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-23 20:45:28 +00:00
Jacob Kaplan-Moss 16c9df0a76 Fixed #10016: the cache middleware no longer vomits when handed long URLs. Thanks, Matt Croydon.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10335 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-01 18:19:32 +00:00
Jacob Kaplan-Moss 657eefbf25 Fixed #10387: removed some code duplication in django.utils.cache. Thanks, Travis Swicegood.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10223 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-30 22:37:59 +00:00
Gary Wilson Jr 90c67e0f55 Fixed typo in comment.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8382 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-15 16:38:41 +00:00
Gary Wilson Jr c85c8f8891 Fixed #7919 -- md5 and sha modules are deprecated since Python 2.5, use hashlib module when available. Patch from Karen Tracey.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8193 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-02 05:56:57 +00:00
Adrian Holovaty 02bbd9a9b2 Fixed #7228 -- Fixed our ETag header creation to meet the HTTP spec, by quoting it. Thanks, skjohn@us.ibm.com
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7659 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-16 04:13:04 +00:00
Malcolm Tredinnick f2f6e70b08 Fixed #5813 -- Taught the CacheMiddleware to respect any max-age HTTP header
when setting the expiry time. Thanks, SmileyChris.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6736 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-29 16:57:18 +00:00
Gary Wilson Jr 66576c285a Some minor changes to the `patch_vary_headers` function:
* Replaced a for loop with a list comprehension.
 * Used a set instead of a dict with dummy values.
 * Used a bit more readable variable names.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6698 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-19 04:00:41 +00:00
Gary Wilson Jr 34cc21983c Removed `vary_delim_re` in `django/utils/cache.py` in favor of existing `cc_delim_re` since the latter is more correct in parsing the header (allows whitespace before and after comma separators instead of just after). As a bonus, tests added for `patch_vary_headers()`.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6696 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-19 03:12:19 +00:00
Gary Wilson Jr 8c442f21dc Fixed #5816 -- Fixed a regression from [6333] that generates incorrect cookie "expires" dates when using a locale other than English. Introduced `http_date` and `cookie_date` utility functions. Thanks for the report Michael Lemaire. Thanks for the patch Karen Tracey and `SmileyChris`.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6634 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-31 03:59:40 +00:00
Gary Wilson Jr d453eda388 Corrected a typo and made some style fixes.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6626 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-28 22:32:25 +00:00
Jacob Kaplan-Moss 964f0c16ad Fixed #5557: URLs are now properly escaped in the cache_page decorator. Thanks, eriks.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6435 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-28 22:34:27 +00:00
Jacob Kaplan-Moss 2dd882885b Fixed #5047: patch_cache_control now respects existing max-age settings. Thanks, permon.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6434 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-28 22:30:59 +00:00
Adrian Holovaty b522469322 Fixed #4071 -- Fixed bug in cache_page decorator, which was setting the wrong header. Thanks, Ionut Ciocirlan (xlotlu) and permon
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6222 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14 21:42:26 +00:00
Malcolm Tredinnick 5dd9a2ab38 Fixed #4199 -- Changed date formatting in HTTP expires header to be spec
compliant. Thanks, Chris Bennett.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5712 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-16 03:50:22 +00:00
Malcolm Tredinnick 953badbea5 Merged Unicode branch into trunk (r4952:5608). This should be fully
backwards compatible for all practical purposes.

Fixed #2391, #2489, #2996, #3322, #3344, #3370, #3406, #3432, #3454, #3492, #3582, #3690, #3878, #3891, #3937, #4039, #4141, #4227, #4286, #4291, #4300, #4452, #4702


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5609 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-04 12:11:04 +00:00
Malcolm Tredinnick 535535a45e Removed a bunch of annoying trailing whitespace.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5068 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-25 07:25:22 +00:00
Adrian Holovaty f69cf70ed8 MERGED MAGIC-REMOVAL BRANCH TO TRUNK. This change is highly backwards-incompatible. Please read http://code.djangoproject.com/wiki/RemovingTheMagic for upgrade instructions.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2809 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-02 01:31:56 +00:00
Adrian Holovaty bc4638d722 Fixed #1569 -- HttpResponse now accepts iterators. Thanks, Maniac
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2639 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-04-09 23:54:34 +00:00
Adrian Holovaty 426e7223fb Changed django.utils.cache.patch_response_headesr to move unnecessary calculation of 'expires' into the 'if' statement
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2528 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-03-17 17:21:26 +00:00
Adrian Holovaty d862908b67 Fixed #920 -- Fixed patch_response_headers() behavior when content is Unicode. Thanks, Sune Kirkeby
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1980 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-15 06:22:24 +00:00
Adrian Holovaty cbe2426369 Made several grammar fixes to cache documentation from [1020]
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1030 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-10-31 03:14:57 +00:00
Jacob Kaplan-Moss f12e324332 Fixed #612 - added cache control headers (thanks, hugo)
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1020 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-10-29 17:00:20 +00:00
Adrian Holovaty a5a89b5a43 Moved vary decorators from django.utils.cache to django.views.decorators.vary
git-svn-id: http://code.djangoproject.com/svn/django/trunk@809 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-10-09 00:37:56 +00:00
Adrian Holovaty 8aa98af6bb Added django.utils.cache, from Hugo's #580 patch. Refs #580.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@808 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-10-08 23:19:21 +00:00