We just ran into this problem also.  It's reported in ticket 6027: 
http://code.djangoproject.com/ticket/6027

GzipMiddleware and responses with files for content (rather than 
strings) don't get along...

--Ned.

[EMAIL PROTECTED] wrote:
> I've been tearing my hair out for a little while trying to figure out
> why I can't display pdfs from Django in Firefox.  I'm getting blank
> windows and I know it used to work ;-)
>
> I'm using the code from the documentation (http://
> www.djangoproject.com/documentation/outputting_pdf/), removing
> "attachment;" from the Content-Disposition to make the pdf display in-
> browser and not open an external viewer.
>
> I've printed the response object, and everything looks ok.  It works
> fine in IE7.  I can view other pdf files in FF (e.g.
> http://www.merlinautomation.co.uk/automation/pub/Test%20Product%20PDF.pdf).
>
> I read in an old thread that older versions of IE could have problems
> with the pdf/gzip combination, so that gave me the idea to turn off
> GZipMiddleware... and that "fixed it".
>
> I'd prefer to not turn of compression for all of my pages though, so
> two questions (1) does it seem reasonable that GZipMiddleware is the
> problem and if so (2) is there a way to turn it off on a per-view
> basis?
>
> -- bjorn
> >
>
>   

-- 
Ned Batchelder, http://nedbatchelder.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to