Search This Blog

Wednesday, September 11, 2013

Unable to download documents from Document Library

This is one of the showstopper issue which people face when they use Liferay 6.1.20 EE GA2 with SSH. and IE 8,7 as the browser. While it works on other browsers like Firefox.The documents from the document library are not available.

Reason:

When the server uses SSL (https os Secure Socket Layer). The apache adds the following to the http headers.

Pragma: no-cache
Cache-control: no-cache,max-age=0,must-revalidate


The IE Browser is  not allowed to store the document in the local system and thus it fails to download the object.

refer:
response.setHeader( HttpHeaders.CACHE_CONTROL, HttpHeaders.CACHE_CONTROL_PUBLIC_VALUE);

present in the classes ServletResponseUtil, PortletResponseUtil.

Here is a link to the microsoft support , which explains the browser issue .
http://support.microsoft.com/default.aspx?scid=kb;en-us;316431

Solution:

Solution 1. Override the code of the classes ServletResponseUtil, PortletResponseUtil. in the setHeaders(request, response, fileName, contentType) method.

                           (or)

solution 2. Add the following line to the apache config file.


        Header unset Pragma

This will remove the pragma entry from the header and the issue would be solved. 






No comments:

Post a Comment

My Blog List