after a couple of weeks reading a myriad of posts, mailing lists and posible
solutions, I came up with a solution that worked for me

I developed a web application using wicket, this application have some links
to a static resources, specifically pdf and excel files, (License
Agreements, Privacy Policies, etc.), when I started to use SSL, none of
these static resources could be viewed in IE, (others browsers work fine),
this is due to an "IE feature", (in Microsoft words, by design, weird
behavior by design), that makes the resource unavailable through SSL.

I needed a general solution that could be applied to all the posible static
resources in my application, so, I came up with a filter that intercepts all
the requests for those static resources, (pdf, xls, etc), and set the
apropriate headers to avoid the problem with IE, after try a zillion
combination of headers, (pragma, content-cache, expiration, etc, none of
them worked for me), I found a solution, just use the response.reset()
method and voila that's all

this is a reduced version of the filter I came up with, for the sake of
brevity.
<pre>
public class HttpsHeaderFilter implements Filter {

        private FilterConfig config = null;

        public void init(FilterConfig config) throws ServletException {
                this.config = config;
        }

        public void destroy() {
                config = null;
        }

        @Override
        public void doFilter(ServletRequest request, ServletResponse response,
                        FilterChain chain) throws IOException, ServletException 
{

                response.reset() ;

                chain.doFilter(request, response );

        }

}

</pre>

and in the web.xml, I configured the url for the appropiate resources I
wanted to filter.
I think that the reset could work better after the doFilter() call, (I'm
going to test that).

as I told before, I even tried to set the headers in the filter but it
didn't work either.

at the end it came out in the simplest way . lol.
Hope it helps to save some time and sleep hours to somebody else, I spent
quite a few of mine working around Microsoft's "design" .



-- 
View this message in context: 
http://www.nabble.com/Wicket-Application-bypassing--Internet-Explorer-file-downloads-over-SSL-do-not-work-with-the-cache-control-headers%E2%80%8F-tp22519881p22552462.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to