summaryrefslogtreecommitdiff
path: root/django/http
AgeCommit message (Collapse)Author
2010-03-02Fixed #11522: Restored ability of http redirect responses to correctly ↵Karen Tracey
handle redirect locations with non-ASCII chars. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12659 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-23Fixed #12470 - django.contrib.messages CookieStorage failing silently in ↵Luke Plant
safari when comma is used in message This issue was fixed by changing the underlying cookie storage mechanism. This will fix other bugs with cookies for Internet Explorer and Safari, but could also cause backwards incompatibilities with existing javascript that may parse cookie values that contain commas or semi-colons, and, very rarely, with existing cookie values. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12282 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-17Fixed #11753 - Q objects with callables no longer explode on Python 2.4. ↵Jacob Kaplan-Moss
Thanks, Jeremy Dunck. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11901 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-12Fixed edge case that breaks the test suite on versions of Python > 2.6.4Brian Rosner
Before http://svn.python.org/view?view=rev&revision=74647 it was possible to pass a SimpleCookie to load, but this no longer works due to a different bug in Python the said revision fixed. My guess is a SimpleCookie was never intended to be passed through load which is perfectly reasonable. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11820 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-08Fixed #10687: fixed request parsing when upload_handlers is empty. Thanks, ↵Jacob Kaplan-Moss
Armin Ronacher. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10723 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-08Fixed a silly function flow bug in [10711].Jacob Kaplan-Moss
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10712 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-08Fixed #10188: prevent newlines in HTTP headers. Thanks, bthomas.Jacob Kaplan-Moss
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10711 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-12Fixed #10267 -- Correctly handle IRIs in HttpResponse.build_absolute_uri().Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10539 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-31Fixed #10184: QueryDicts with multiple values can now be safely pickled. ↵Jacob Kaplan-Moss
Thanks, Alex Gaynor. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10240 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-30Fixed #8643 -- Corrected docstrings of `MultiPartParser`, thanks KayEss.Gary Wilson Jr
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10213 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-29Fixed #8278: fixed `QueryDict.update(QueryDict)`. Thanks, julien.Jacob Kaplan-Moss
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8705 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-28Fixed an inconsistancy in redirects with `META['SERVER_PORT']` being either ↵Jacob Kaplan-Moss
a string or an int. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8666 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-23Fixed #7494 -- Fixed build_absolute_url() for some types of (uncommon) URLs.Malcolm Tredinnick
Patch from tom@almostobsolete.net and RobotAdam. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8490 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-21Fixed #7233 -- Ensured that QueryDict classes are always unpicklable. ThisMalcolm Tredinnick
problem only arose on some systems, since it depends upon the order in which the attributes are pickled. Makes reliable testing kind of tricky. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8460 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-03Fixed #8092, #3828 -- Removed dictionary access for request objects so that ↵Gary Wilson Jr
GET and POST data doesn't "overwrite" request attributes when used in templates (since dictionary lookup is performed before attribute lookup). This is backwards-incompatible if you were using the request object for dictionary access to the combined GET and POST data, but you should use `request.REQUEST` for that instead. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8202 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-22Fixed #7848 -- Removed a bunch of code that wasn't contributing to society. ↵Adrian Holovaty
Thanks, julien git-svn-id: http://code.djangoproject.com/svn/django/trunk@8047 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-21Changed/fixed the way Django handles SCRIPT_NAME and PATH_INFO (orMalcolm Tredinnick
equivalents). Basically, URL resolving will only use the PATH_INFO and the SCRIPT_NAME will be prepended by reverse() automatically. Allows for more portable development and installation. Also exposes SCRIPT_NAME in the HttpRequest instance. There are a number of cases where things don't work completely transparently, so mod_python and fastcgi users should read the relevant docs. Fixed #285, #1516, #3414. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8015 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-19Revert [7991] - [7993]. I was committing from the wrong branch. Sorry 'boutMalcolm Tredinnick
that, folks. :-( git-svn-id: http://code.djangoproject.com/svn/django/trunk@7995 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-19First part of setting request.path correctly.Malcolm Tredinnick
Still needs: - testing - docs changes - some way of fixing reverse(). git-svn-id: http://code.djangoproject.com/svn/django/trunk@7991 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-12Fixed #7635: do a better job checking for infinite loops in multi-part MIME ↵Jacob Kaplan-Moss
parsing. Thanks, Mike Axiak. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7905 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-07Fixed #7651: uploading multiple files with the same name now work. Also, in ↵Jacob Kaplan-Moss
order to test the problem the test client now handles uploading multiple files at once. Patch from Mike Axiak. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7858 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-07Fixed #4148 -- Changed the way attachments are served to IE to avoid someMalcolm Tredinnick
caching and header-related bugs there. Only comes into play when Internet Explorer is the user-agent. Patch from Michael Axiak, with testing from Axis_of_Entropy and Karen Tracey. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7856 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-01Fixed #2070: refactored Django's file upload capabilities.Jacob Kaplan-Moss
A description of the new features can be found in the new [http://www.djangoproject.com/documentation/upload_handing/ upload handling documentation]; the executive summary is that Django will now happily handle uploads of large files without issues. This changes the representation of uploaded files from dictionaries to bona fide objects; see BackwardsIncompatibleChanges for details. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7814 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-20Fixed #6616 -- Added an is_ajax() method to HttpRequest that uses the de factoMalcolm Tredinnick
standard header for detecting an XmlHttpRequest call. Thanks, Daniel Lindsley. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7334 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-17Fixed #6764 -- Added some error checking around cookie decoding. Thanks,Malcolm Tredinnick
Michael Axiak. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7257 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-08A few styling fixes.Gary Wilson Jr
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7205 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-08Fixed #6657 -- Don't set secure attribute on cookie if `secure=False` is ↵Gary Wilson Jr
passed, thanks Gulopine. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7204 bcc190cf-cafb-0310-a4f2-bffc1f526a37
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