#5898: HeadMiddleware - Modify response for HEAD requests
--------------------------------------------------------+-------------------
   Reporter:  Scott Barr <[EMAIL PROTECTED]>  |                Owner:  nobody   
    
     Status:  reopened                                  |            Component: 
 HTTP handling
    Version:  SVN                                       |           Resolution: 
              
   Keywords:                                            |                Stage: 
 Unreviewed   
  Has_patch:  1                                         |           Needs_docs: 
 0            
Needs_tests:  0                                         |   Needs_better_patch: 
 0            
--------------------------------------------------------+-------------------
Comment (by arien <[EMAIL PROTECTED]>):

 The problem I was going to fix is that HEAD request ''do'' return content
 whenever the conditional get middleware isn't used.  Using the conditional
 get middleware is optional (and not even the default), not returning a
 message body on HEAD requests is mandatory.

 In doing this, I found that there was another piece of "look into the user
 generated response and make sure we're HTTP compliant in this respect"
 code in there called fix_location_header.  The problem was that
 fix_location_header was called ''before'' response middleware, while this
 new piece of code obviously needed to go ''after''.  So I submitted a
 half-hearted attempt at a patch (remove_unallowed_content.diff) that
 deferred any design decision, waffling about automagical middlewares.

 Later, I decided that the ''correct'' fix would be for both
 fix_location_headers and this new piece of code to hook into the request
 processing after the response middleware.  (The way fix_location_header
 was used didn't correspond to its stated reason for existence anyway, and
 making this one change would solve that as well.)  There might even be
 more fix-ups in the future if/when Django gets more ambitious about this
 sort of thing.  Hence http_requirements.diff.

 (The mischaracterizations are getting rather tiresome, mtredinnick.)

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