Commit Graph

40 Commits

Author SHA1 Message Date
Jacob Kaplan-Moss ca9388cdaf Added more dict-like methods to HttpResponse as part of the response.headers -> 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-14 22:33:56 +00:00
Malcolm Tredinnick 6d31e431c3 Fixed #4909 -- Fixed a race condition with middleware initialisation in multi-threaded setups. Thanks, colin@owlfish.com.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5868 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-12 10:24:05 +00:00
Malcolm Tredinnick fad7247715 Changed HttpRequest.path to be a Unicode object. It has already been
URL-decoded by the time we see it anyway, so keeping it as a UTF-8 bytestring
was causing unnecessary problems.

Also added handling for non-ASCII URL fragments in feed creation (the portion
that was outside the control of the Feed class was messed up).



git-svn-id: http://code.djangoproject.com/svn/django/trunk@5629 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-07 17:15:54 +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 439cb4047f Fixed #4040 -- Changed uses of has_key() to "in". Slight performance
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-04-26 13:30:48 +00:00
Adrian Holovaty d506b90163 Fixed #2924 -- Development server no longer spins on an empty form post. Bug caused by [3805]
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4144 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-11-29 22:51:24 +00:00
Adrian Holovaty e71fb7c7f2 Fixed #3057 -- Improved wsgi backend to tolerate empty string in CONTENT_LENGTH. Thanks for the patch, Ivan Sagalaev
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4107 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-11-26 23:52:12 +00:00
Adrian Holovaty 9884211a1a Fixed #3057 -- Fixed typo in [4091]. Thanks for the heads-up, Barry Pederson
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4094 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-11-23 17:48:06 +00:00
Adrian Holovaty a2e227f2fa Fixed #3057 -- Changed WSGI handler not to expect CONTENT_LENGTH. Thanks for the patch, Ivan Sagalaev
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4091 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-11-23 17:06:11 +00:00
Adrian Holovaty f638234932 Removed ENABLE_PSYCO setting. If you still need to use this, write custom middleware that activates psyco for you.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3877 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-28 02:31:05 +00:00
Adrian Holovaty 15e7805ae4 Changed BaseHandler.get_response() to take a single parameter (an HttpRequest object) rather than a URL and the HttpRequest object, which is redundant
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3875 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-28 01:56:02 +00:00
Malcolm Tredinnick f1c63992f7 Fixed #2745 -- Made the __repr__ methods for modpython and wsgi request more
robust in the face of bad input, since they are needed for error handling.
Based on a patch from md@hudora.de.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@3820 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-25 07:25:12 +00:00
Malcolm Tredinnick 28fad23a3f A corrected version of r3805.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3807 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-23 13:53:02 +00:00
Malcolm Tredinnick 12273fa947 Reverting r3805 whilst I track down a potential problem with it.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3806 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-23 13:04:37 +00:00
Malcolm Tredinnick 6a12d767d4 Fixed #2613 -- Fixed an easily triggered memory error in file uploads for WSGI.
Thanks Jeong-Min Lee.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@3805 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-23 12:41:19 +00:00
Malcolm Tredinnick c3d7aad6d0 Fixed #2560 -- Add close() support to HttpResponse iterators. Thanks, Ivan
Sagalaev.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@3791 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-22 12:32:00 +00:00
Jacob Kaplan-Moss 17d0bd1512 Fixed a bunch of spurious imports, typos, and other small errors turned up by a pass through PyFlakes. This covers about the first third of the errors.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3411 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-21 17:11:13 +00:00
Jacob Kaplan-Moss e9a236d86c Fixed #2092: added a "is_secure()" method to HttpRequest which correctly 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-07-21 16:20:22 +00:00
Russell Keith-Magee 9b6d1efe77 Clarified debug naming of WSGIRequests
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3393 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-20 05:04:45 +00:00
Adrian Holovaty 37addba352 Converted request.META['REQUEST_METHOD'] calls to request.method, throughout the Django codebase
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3171 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-20 04:34:13 +00:00
Adrian Holovaty 136752ca9a Added 'method' attribute to HttpRequest objects
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3164 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-20 03:48:31 +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 f86004a4d3 Fixed #1376 -- Undid [2358], which broke flatpages. Thanks, Tom Tobin
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2364 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-20 04:36:17 +00:00
Adrian Holovaty 2c443df341 Fixed #894 -- Moved response middleware call to base.py so that exceptions in that middleware get processed by the standard exception handling. As a nice side effect, this cuts down on a bit of redundant code.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2358 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-18 23:41:17 +00:00
Adrian Holovaty 567e4e4411 Fixed #1323 -- Added ENABLE_PSYCO. Thanks, Wojtek.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2239 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-03 15:18:20 +00:00
Adrian Holovaty 5676d5b068 Fixed #923 -- Made WSGI handler tolerant of no QUERY_STRING in os.environ. Thanks, michael.mcewan
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1442 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-26 18:41:29 +00:00
Adrian Holovaty ab9aacd4db Fixed #333 and #440 -- Split DEFAULT_MIME_TYPE setting into DEFAULT_CONTENT_TYPE and DEFAULT_CHARSET. Thanks, Maniac.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@786 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-10-06 02:27:08 +00:00
Adrian Holovaty 6e034a831a Fixed #481 -- Added all other HTTP status codes to WSGI backend. Thanks, eugene
git-svn-id: http://code.djangoproject.com/svn/django/trunk@636 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-13 03:21:44 +00:00
Adrian Holovaty 07889c13a6 Fixed #1 -- Added anonymous session support via middleware and request.session. Removed the former request.session, which wasn't being used anyway. Removed auth.Session model. See the BackwardsIncompatibleChanges wiki page for IMPORTANT notes on code you'll have to change and a DB table you'll have to create.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@518 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-16 22:54:05 +00:00
Adrian Holovaty d22e88898f Changed handlers (both mod_python and WSGI) to support setting multiple cookies per request
git-svn-id: http://code.djangoproject.com/svn/django/trunk@511 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-15 22:47:41 +00:00
Adrian Holovaty 199aa88ffb Moved django.core.handlers.wsgi.AdminMediaHandler to django.core.servers.basehttp. Makes more sense to have it in there, because its only use is for the development server.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@491 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-12 04:16:29 +00:00
Adrian Holovaty fcfb8edc15 Fixed #126 -- HttpRequest now has a 'raw_post_data' attribute.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@478 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-10 22:12:05 +00:00
Adrian Holovaty 77d20bedd4 Fixed #192 -- File uploads now work with built-in Web server. Thanks, mordaha@gmail.com
git-svn-id: http://code.djangoproject.com/svn/django/trunk@476 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-10 21:20:45 +00:00
Adrian Holovaty c97efb6799 Fixed #63 -- Refactored django.core.handlers into subclasses to remove duplicate code
git-svn-id: http://code.djangoproject.com/svn/django/trunk@298 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-07-22 18:34:38 +00:00
Adrian Holovaty d573cb021e Fixed #112 -- WSGI handler now displays proper text status. Thanks, sune.kirkeby@gmail.com!
git-svn-id: http://code.djangoproject.com/svn/django/trunk@297 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-07-22 18:12:05 +00:00
Adrian Holovaty e215ed3609 Fixed #102 -- Now using text/plain mimetype for exceptions displayed in the browser, so angle brackets are no longer an issue
git-svn-id: http://code.djangoproject.com/svn/django/trunk@241 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-07-20 06:13:06 +00:00
Adrian Holovaty 62cc287b2b Fixed #76 -- development server now serves images, too, at whatever relative URL is provided by ADMIN_MEDIA_PREFIX
git-svn-id: http://code.djangoproject.com/svn/django/trunk@186 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-07-18 22:49:04 +00:00
Adrian Holovaty a7506973af Moved default admin from media to django/conf/admin_media, so Django is able to introspect their location, in preparation for #76
git-svn-id: http://code.djangoproject.com/svn/django/trunk@185 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-07-18 22:35:04 +00:00
Adrian Holovaty ca3d89b70f Added WSGI support. Created core.handlers package. Moved ALL mod_python-specific code to django.core.handlers.modpython. Note that django.core.handler is still a valid mod_python handler but IS DEPRECATED. Use django.core.handlers.modpython, instead.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@169 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-07-18 06:30:26 +00:00