#9140: bug in django.http.multipartparser.MultiPartParser after
HttpResponseRedirect of a form post with files
------------------------------------+---------------------------------------
          Reporter:  nbstrite       |         Owner:  nobody
            Status:  new            |     Milestone:        
         Component:  HTTP handling  |       Version:  1.0   
        Resolution:                 |      Keywords:        
             Stage:  Unreviewed     |     Has_patch:  1     
        Needs_docs:  0              |   Needs_tests:  0     
Needs_better_patch:  0              |  
------------------------------------+---------------------------------------
Changes (by nbstrite):

  * needs_better_patch:  => 0
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 Sorry about the ticket example, I forgot to preview before submission.

 {{{
 ====== View that will recreate bug =======
 from django.http import HttpResponseRedirect, HttpResponse

 def test(request):
     # I am only including this here to simulate an attempt to access
 request.POST
     # outside of a conditional to ensure the method is POST
     # this is obviously not a best practice, we should nest this
     # under a "if request.method == 'POST':" conditional. But some
 middleware
     # out of our control might access request.POST in an unsafe fashion
     request.POST.keys()
     if request.method == 'POST':
         return HttpResponseRedirect('/')
     return HttpResponse("<form enctype='multipart/form-data' action='/'
 method='post'><input type='submit' /></form>")
 }}}

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

Reply via email to