#18648: ConditionalGetMiddleware does not work with Internet Explorer
-------------------------------+--------------------------------------
     Reporter:  KyleMac        |                    Owner:  nobody
         Type:  Bug            |                   Status:  closed
    Component:  HTTP handling  |                  Version:  1.4
     Severity:  Normal         |               Resolution:  needsinfo
     Keywords:                 |             Triage Stage:  Unreviewed
    Has patch:  0              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+--------------------------------------

Comment (by KyleMac):

 Yes, the anon comment is me.

 The reason the middleware fails to parse the header from IE is pretty
 simple. The whole header value is passed to `parse_http_date_safe` which
 returns None due to the extra stuff IE adds to the end. The simple fix is
 something like:

     if_modified_since =
 parse_http_date_safe(if_modified_since.split(';')[0])

 This bug has nothing to do with the middleware adding headers but is
 instead about how it parses headers sent by the browser. The mystery is
 what does runserver do that causes IE to send an invalid header while IE
 responds to Apache + mod_wsgi with a valid header.

 This bug is minor but really annoying if you're actually developing views
 that are meant to be cached. Since Webkit, Firefox and IE all have
 slightly different caching behaviour you do need to test thoroughly in
 each browser and this bug makes that harder.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/18648#comment:3>
Django <https://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 django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to