#5898: HeadMiddleware - Modify response for HEAD requests -----------------------------------------------------+---------------------- Reporter: Scott Barr <[EMAIL PROTECTED]> | Owner: nobody Status: new | Component: HTTP handling Version: SVN | Keywords: Stage: Unreviewed | Has_patch: 1 -----------------------------------------------------+---------------------- Here is a patch to django.middleware.http.py that (1) add's a "Content- Length" header to the HTTP response if the "Content-Length" header hasn't already been supplied, and (2) removes the content from the response, for HEAD requests where the response code is 200.
This makes the HTTP response useful for HEAD requests, which shouldn't have content in the response. The Content-Length header is desirable in the response headers. -- Ticket URL: <http://code.djangoproject.com/ticket/5898> Django Code <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 -~----------~----~----~----~------~----~------~--~---
