As I have reported previously in this forum, I think that
response.stream does not quite stream zip files correctly.

So if I were you I would first stream a static zip file, when this is
working then try and get your code above working.

What I suggest you change in the code above is

response.headers['Content-Type'] = c.contenttype(filename)

where filename is the path to the zip file.

On Oct 13, 5:36 pm, Matt Broadstone <[email protected]> wrote:
> On Thu, Oct 13, 2011 at 11:34 AM, pbreit <[email protected]> wrote:
> > My first suggestion would be to save the files to disk and serve statically
> > if possible.
>
> I would prefer not to touch the disk if possible, these are not huge
> files just logs. I think I'm very close, when I serve this without the
> zipfile code (just wrapping raw_data in a StringIO), a dialog pops up
> asking me to save the file. However, with the zipfile code, the
> request seems to take much longer (as if its downloading something)
> and then an error is displayed in the dev console:
>
> "Failed to load resource"
> "Unsafe JavaScript attempt to access frame with URL
> chrome://chromewebdata/ from frame with URLhttp://10.0.15.97:2345/.
> Domains, protocols and ports must match."
>
> Perhaps the headers need to be modified to serve the zip file? Any
> suggestions are welcome here!
> Matt

Reply via email to