summaryrefslogtreecommitdiff
path: root/django/http
AgeCommit message (Collapse)Author
2008-02-27Removed an unnecessary default argument in one __deepcopy__() method and fixedMalcolm Tredinnick
up the one place that was mistakenly relying on that. Refs #6308. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7167 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-17Fixed #5956 -- Added a better error description for non-ASCII HTTP headers. ↵Malcolm Tredinnick
Patch from jvloothuis. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6927 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-05Fixed #6063 -- Caught one place in HttpResponse that was not returning a strMalcolm Tredinnick
type (violation of WSGI spec). Thanks, janusz.harkot@gmail.com. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6895 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-01Small docstring edit in django/http/utils.py from [6662]Adrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6793 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-11Fixed #5898 -- Changed a few response processing paths to make things harder ↵Malcolm Tredinnick
to get wrong and easier to get right. Previous behaviour wasn't buggy, but it was harder to use than necessary. We now have automatic HEAD processing always (previously required ConditionalGetMiddleware), middleware benefits from the Location header rewrite, so they can use relative URLs as well, and responses with response codes 1xx, 204 or 304 will always have their content removed, in accordance with the HTTP spec (so it's much harder to indavertently deliver invalid responses). Based on a patch and diagnosis from regexbot@gmail.com. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6662 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-20Fixed #5562 -- Changed settings of Expires heading when expiring a cookie toMalcolm Tredinnick
work with non-compliant browsers (also removes a non-compliance feature of our own). Thanks, caifen1985@gmail.com and SmileyChris. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6549 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-20Fixed #4969 -- Changed content retrieval in HttpResponse to be more robust inMalcolm Tredinnick
the presence of an existing content encoding. Fixes some sporadic failures with the GzipMiddleware, for example. Thanks, Johann Queuniet. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6548 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-20Changed the way we handle HTTP headers internally so that they appearMalcolm Tredinnick
case-insensitive, but the original case is preserved for output. This increases the chances of working with non-compliant clients without changing the external interface. Fixed #2970. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6546 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-20Changed HttpResponse.get() to lower case the header value before looking it ↵Malcolm Tredinnick
up. This makes it consistent will other header accesses. Fixed #5754, #5772. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6537 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-03Fixed #4986 -- Fixed a logic bug from [6166].Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6449 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-15Added a get_host() method to HttpRequest. There is still an http.get_host() ↵Malcolm Tredinnick
version in place, so this is fully backwards compatible. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6296 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14Added more dict-like methods to HttpResponse as part of the response.headers ↵Jacob Kaplan-Moss
-> response._headers move, and fixed a few direct uses of response.headers in Django itself. Thanks to PhiR for tracking down and slaying these bugs. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6235 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14Backwards-incompatible change: renamed HttpResponse.headers to ↵Jacob Kaplan-Moss
HttpResponse._headers to deliberately break anyone accessing headers directly instead of through the case-insensitive proxies on HttpResponse itself. See BackwardsIncompatibleChanges for more details. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6225 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14Fixed the breakage in [6164] in a different, better way: HttpResponse now ↵Jacob Kaplan-Moss
implements __contains__ along with __get/set/delitem__, as it should. This is a bit more robust, and should prevent similar breakage from user code. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6221 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14Fixed #2970: made HttpResponse headers case-insensitive. Thanks to ↵Jacob Kaplan-Moss
SmileyChris for the original patch and PhiR for the final one. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6212 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14Fixed #5445: added some compatibility code for the lack of __iter__ in ↵Jacob Kaplan-Moss
Jython 2.2. Thanks, Leo Soto. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6211 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14Fixed a typo from [6164].Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6167 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14Fixed #4986 -- Improved get_host() host detection. Thanks, SmileyChris.Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6166 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14Fixed #987 -- Convert relative URI portions into absolute URIs in HTTP ↵Malcolm Tredinnick
Location headers. Based on a patch from SmileyChris. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6164 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-11Refs #5138 -- Refactored implementation of __contains__ in HttpRequest ↵Russell Keith-Magee
introduced in [6097] after a suggestion from Malcolm. Applied a similar refactor for MergeDict and Context which had comparable behavior. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6098 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-11Fixed #5318 -- Added __contains__ method to HttpRequest, mirroring existing ↵Russell Keith-Magee
has_key method. Thanks for the patch, robbie@prelab.net. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6097 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-12Fixed #4947 -- Avoid displaying uploaded file contents in the debug web ↵Malcolm Tredinnick
page. Based on a patch from eibaan@gmail.com. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5874 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-12Clarified the reasoning in a comment.Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5873 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-11Fixed #3526 -- Added content_type as an alias for mimetype to the ↵Malcolm Tredinnick
HttpResponse constructor. It's a slightly more accurate name. Based on a patch from Simon Willison. Fully backwards compatible. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5844 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-11Fixed #4815 -- Fixed decoding of request parameters when the input encoding isMalcolm Tredinnick
not UTF-8. Thanks, Jordan Dimov. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5644 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-04Merged Unicode branch into trunk (r4952:5608). This should be fullyMalcolm Tredinnick
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-06-27Added a parameter to HttpResponse's constructor to enable explicit status codeMalcolm Tredinnick
setting. This will save us from being asked to add a subclass for every possible HTTP status code. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5554 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-22Backed out the changes in [5482] for a bit whilst some more investigation intoMalcolm Tredinnick
side-effects is done. Refs #4565. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5511 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-17Fixed #4565 -- Changed template rendering to use iterators, rather thanMalcolm Tredinnick
creating large strings, as much as possible. This is all backwards compatible. Thanks, Brian Harring. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5482 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-19Fixed #4337 -- Added pop() method to QueryDict. Thanks, Gary Wilson.Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5289 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-11Fixed #4270 -- Don't permit deleting of items from an immutable QueryDict.Malcolm Tredinnick
Thanks, Gary Wilson. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5187 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-26Fixed #4040 -- Changed uses of has_key() to "in". Slight performanceMalcolm Tredinnick
improvement and forward-compatible with future Python releases. Patch from Gary Wilson. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5091 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-03-30Fixed #3875 -- Added HttpResponseBadRequest. Thanks, Scott Barr.Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4866 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-03-30Refactored the HttpResponse sub-classes so that adding a subclass that onlyMalcolm Tredinnick
changes the HTTP status code requires less code (no need to duplicate the __init__ method). git-svn-id: http://code.djangoproject.com/svn/django/trunk@4865 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-26Fixed another Python 2.3 bug (this one on django.http.parse_file_upload). I ↵Jacob Kaplan-Moss
think there's one left. git-svn-id: http://code.djangoproject.com/svn/django/trunk@4615 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-11Revert [4485] in order to fix accidental mod_python breakage. Refs #2920.Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4486 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-11Refs #2920 -- Replaced implicit uses of _() with explicit imports or calls ↵Russell Keith-Magee
to gettext(). At some point post 0.96, we need to remove the calls that put _ into the builtins. git-svn-id: http://code.djangoproject.com/svn/django/trunk@4485 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-10Fixed #3437 -- Fixed incorrect logic in django.http.HttpResponse calculation ↵Adrian Holovaty
of _is_string. Thanks, Brian Harring git-svn-id: http://code.djangoproject.com/svn/django/trunk@4472 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-11-29Fixed #3080 -- Fixed bug in delete_cookie() method. Thanks, nowell striteAdrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4135 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-22Fixed #2560 -- Add close() support to HttpResponse iterators. Thanks, IvanMalcolm Tredinnick
Sagalaev. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3791 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-09Fixed #2503 -- Fixed HttpResponse.delete_cookie() to work properly. It now ↵Adrian Holovaty
takes path and domain as optional keyword arguments. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3545 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-21Fixed #2092: added a "is_secure()" method to HttpRequest which correctly ↵Jacob Kaplan-Moss
handles the subtleties of mod_python's interaction with os.environ. This one's been bugging me for about a *year*, so many many thanks to k.shaposhnikov@gmail.com for figuring it out, and Tim Shaffer for pointing out this ticket. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3410 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-20Fixed #2078 -- Improved HttpResponseRedirect and ↵Adrian Holovaty
HttpResponsePermanentRedirect to percent-encode non-ASCII characters in the Location header. Thanks, Andrey git-svn-id: http://code.djangoproject.com/svn/django/trunk@3166 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-20Added 'method' attribute to HttpRequest objectsAdrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3164 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-19Fixed #1646 -- Added HttpResponseNotAllowed, as suggested by Ian Holsman.Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3144 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-02MERGED MAGIC-REMOVAL BRANCH TO TRUNK. This change is highly ↵Adrian Holovaty
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