IE cannot download files over SSL served by WebSphere

后端 未结 6 1740
眼角桃花
眼角桃花 2021-02-15 18:22

IE 7 & 8 both throw an error when users attempt to download a csv file over https.

Internet Explorer cannot download downloadPage.jsf. Internet Explor

6条回答
  •  失恋的感觉
    2021-02-15 18:51

    It appears that WebSphere automatically adds Cache-Control:no-cache=set-cookie response header when cookies are included in the response. IE8 & older do not like this when downloading over SSL.

    There are two possible fixes as per this IBM Developerworks forum thread:

    1. Add the custom response header CookiesConfigureNoCache:false for HTTP transport Channel in WebSphere (it's true by default).

      response.setHeader("CookiesConfigureNoCache", "false");             
      
    2. Explicitly set the Cache-Control header after cookies are being added, this will override the WebSphere-set one.

      response.addCookie(...);
      response.addCookie(...);
      ...
      response.setHeader("Cache-Control", ...);
      

提交回复
热议问题