[Zope] zip files corrupted with IE when opened, fine when downloaded

2008-03-17 Thread robert rottermann
Hi there,
we have a problem with an intranet that runs using plone 2.5.3

when users using IE want to open a zip file from the intranet by using
the "open" option from the download dialog they get winzip complaining
that the file is corrupted.
if they select "save" from the same dialog they can open the zip archive
without problem.

does anyone know a solution for this or give me an idea where to look
for one?

thanks
robert

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] zip files corrupted with IE when opened, fine when downloaded

2008-03-17 Thread Jim Washington

robert rottermann wrote:

Hi there,
we have a problem with an intranet that runs using plone 2.5.3

when users using IE want to open a zip file from the intranet by using
the "open" option from the download dialog they get winzip complaining
that the file is corrupted.
if they select "save" from the same dialog they can open the zip archive
without problem.

does anyone know a solution for this or give me an idea where to look
for one?
  
I had a similar problem with pdf files, and googling indicated that IE 
might be deleting the cached copy of the document before the opening 
application can get to it.


I have had some success setting cache control to "private".  Something like:

request.response.setHeader('cache-control','private')

"private,must-revalidate" may also be a good value, depending on your 
situation.


It's worth a try...

- Jim Washington

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] zip files corrupted with IE when opened, fine when downloaded

2008-03-17 Thread Jim Washington

Jim Washington wrote:

robert rottermann wrote:

Hi there,
we have a problem with an intranet that runs using plone 2.5.3

when users using IE want to open a zip file from the intranet by using
the "open" option from the download dialog they get winzip complaining
that the file is corrupted.
if they select "save" from the same dialog they can open the zip archive
without problem.

does anyone know a solution for this or give me an idea where to look
for one?
  
I had a similar problem with pdf files, and googling indicated that IE 
might be deleting the cached copy of the document before the opening 
application can get to it.


I have had some success setting cache control to "private".  Something 
like:


request.response.setHeader('cache-control','private')

"private,must-revalidate" may also be a good value, depending on your 
situation.


I Googled back through and found that the problem usually manifests when 
you have a 'cache-control':'no-cache' header.  The above explanation was 
not quite right.


Anyway, either removing the "no-cache" header or using one that allows 
the local machine to keep a copy should work, if the problem is in fact 
a 'no-cache' header.


- Jim Washington
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] zip files corrupted with IE when opened, fine when downloaded

2008-03-17 Thread robert rottermann
thanks Jim
I'll try that

robert

Jim Washington schrieb:
> Jim Washington wrote:
>> robert rottermann wrote:
>>> Hi there,
>>> we have a problem with an intranet that runs using plone 2.5.3
>>>
>>> when users using IE want to open a zip file from the intranet by using
>>> the "open" option from the download dialog they get winzip complaining
>>> that the file is corrupted.
>>> if they select "save" from the same dialog they can open the zip archive
>>> without problem.
>>>
>>> does anyone know a solution for this or give me an idea where to look
>>> for one?
>>>   
>> I had a similar problem with pdf files, and googling indicated that IE
>> might be deleting the cached copy of the document before the opening
>> application can get to it.
>>
>> I have had some success setting cache control to "private".  Something
>> like:
>>
>> request.response.setHeader('cache-control','private')
>>
>> "private,must-revalidate" may also be a good value, depending on your
>> situation.
>>
> I Googled back through and found that the problem usually manifests when
> you have a 'cache-control':'no-cache' header.  The above explanation was
> not quite right.
> 
> Anyway, either removing the "no-cache" header or using one that allows
> the local machine to keep a copy should work, if the problem is in fact
> a 'no-cache' header.
> 
> - Jim Washington
> ___
> Zope maillist  -  Zope@zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
> http://mail.zope.org/mailman/listinfo/zope-dev )
> 
> 

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] zip files corrupted with IE when opened, fine when downloaded

2008-03-18 Thread Chris Withers

robert rottermann wrote:

Hi there,
when users using IE want to open a zip file from the intranet by using
the "open" option from the download dialog they get winzip complaining
that the file is corrupted.
if they select "save" from the same dialog they can open the zip archive
without problem.


Sounds like you have a .tar.gz being served with an incorrect content 
type such that IE stupidly saves it as a .tar which then gets passed to 
WinZip, which doesn't look at the content of the file and so tries to 
open the .tar.gz as if it was a .tar and so barfs...


cheers,

Chris

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] zip files corrupted with IE when opened, fine when downloaded

2008-03-19 Thread robert rottermann
Chris Withers schrieb:
> robert rottermann wrote:
>> Hi there,
>> when users using IE want to open a zip file from the intranet by using
>> the "open" option from the download dialog they get winzip complaining
>> that the file is corrupted.
>> if they select "save" from the same dialog they can open the zip archive
>> without problem.
> 
> Sounds like you have a .tar.gz being served with an incorrect content
> type such that IE stupidly saves it as a .tar which then gets passed to
> WinZip, which doesn't look at the content of the file and so tries to
> open the .tar.gz as if it was a .tar and so barfs...
> 
> cheers,
> 
> Chris
> 
thanks,
but its a *.zip file. and it is when opening in the window that springs
up at the end of the download.
when it is saved and then opened all is fine

robert
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )