#5897: Add Content-Length header in common middleware
---------------------------------------------------------------+------------
Reporter: Scott Barr <[email protected]> | Owner:
ccahoon
Status: new | Milestone:
Component: HTTP handling | Version:
SVN
Resolution: | Keywords:
Content-Length middleware
Stage: Design decision needed | Has_patch:
1
Needs_docs: 0 | Needs_tests:
0
Needs_better_patch: 0 |
---------------------------------------------------------------+------------
Comment (by graham_king):
ConditionalGetMiddleware already does this (amongst other things).
http://docs.djangoproject.com/en/dev/ref/middleware/#module-
django.middleware.http
Is that not sufficient?
Also, Content-Length should be set for all header codes (Ajax and REST
APIs will use a wider selection, 201 for example).
core/handlers/base.py will use http.conditional_content_removal to remove
Content-Length for any response codes that shouldn't have it, so setting
for all is safe.
--
Ticket URL: <http://code.djangoproject.com/ticket/5897#comment:7>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---