#5898: HEAD processing should be compulsory
--------------------------------------------------------+-------------------
   Reporter:  Scott Barr <[EMAIL PROTECTED]>  |                Owner:  nobody   
    
     Status:  reopened                                  |            Component: 
 HTTP handling
    Version:  SVN                                       |           Resolution: 
              
   Keywords:                                            |                Stage: 
 Accepted     
  Has_patch:  1                                         |           Needs_docs: 
 0            
Needs_tests:  0                                         |   Needs_better_patch: 
 0            
--------------------------------------------------------+-------------------
Comment (by arien <[EMAIL PROTECTED]>):

 Replying to [comment:10 mtredinnick]:

 The functionality is there, but is should be compulsory; you shouldn't
 have to turn on !ConditionalGetMiddleware for that.

 The reason I mention fix_location_header isn't because it has to do with
 handling of HEAD requests (it doesn't), it's because fix_location_header
 could also be in some optional middleware, yet it isn't.  Why is that?
 The same reasons could be given for this issue IMHO.

 The concrete bugs, if that helps:

 1. HEAD requests can return content unless !ConditionalGetMiddleware is
 installed and is run after all other middleware.

 2. Response middleware can still happily generate invalid Location
 headers, because fix_location_header runs too early to catch that.

 The last patch fixes both issues and also makes sure that responses with
 status codes 1xx, 204 and 304 will never return content.  (Well, when
 conversion of the "raw" request to the handler's request_class fails you
 are stuck with a "raw" request, so there I punted.)

-- 
Ticket URL: <http://code.djangoproject.com/ticket/5898#comment:13>
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to