You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Alexita <ct...@hotmail.com> on 2009/03/15 06:11:37 UTC
Wicket Application bypassing- Internet Explorer file downloads over SSL do not work with the cache control headers
Hi,
I have a basic Internet banking application developed in wicket, everything
works fine on test, but in production with https, all links which try to
download a pdf were broken. That's an IE bug, but Microsoft is not
interested in fixing it(all other browsers work ok).
I know the solution is set the response headers as follows:
response.setHeader("Cache-Control", "must-revalidate");
response.setHeader( "Pragma", "public" );
Wicket allows to override response's headers (setHeaders(WebResponse
response)) but only for "webpage" subclasses.
I using ExternalLinks added to a form not related at all with the webPage,
There's any way to override those headers?
I tried to do directly in the HTML as a META tags, but doesn't work either.
or there are a better way to bypass this problem?? (not using IE is not an
option)
Thanks in advance for any information you can provide.
Alexa
--
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-tp22519881p22519881.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Wicket Application bypassing- Internet Explorer file downloads over SSL do not work with the cache control headers
Posted by AndresGMF <am...@yahoo.com>.
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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Wicket Application bypassing- Internet Explorer file downloads over SSL do not work with the cache control headers
Posted by Alexita <ct...@hotmail.com>.
Thanks Igor, I already tried that, but for some estrange reason the response
continues showing cache-control=no-cache and pragma=no-cache(using
FiddlerTool http analizer) even when the filter is setting those headers
with a different information (The filter is writting the log file - Log4j so
it is working).
I know that setting the headers in wicket works (I have some resourceLinks
that works fine), so, it is possible that DownloadLinks uses a wicket
callback? I'll have to change my application but I think it'll take less
time that find the filter error.
Thanks,
Alexa
igor.vaynberg wrote:
>
> external links do not use a wicket callback, you have to install a
> filter that intercepts those urls and sets the headers
>
> -igor
>
> On Sat, Mar 14, 2009 at 10:11 PM, Alexita <ct...@hotmail.com> wrote:
>>
>> Hi,
>> I have a basic Internet banking application developed in wicket,
>> everything
>> works fine on test, but in production with https, all links which try to
>> download a pdf were broken. That's an IE bug, but Microsoft is not
>> interested in fixing it(all other browsers work ok).
>>
>> I know the solution is set the response headers as follows:
>> response.setHeader("Cache-Control", "must-revalidate");
>> response.setHeader( "Pragma", "public" );
>>
>> Wicket allows to override response's headers (setHeaders(WebResponse
>> response)) but only for "webpage" subclasses.
>>
>> I using ExternalLinks added to a form not related at all with the
>> webPage,
>> There's any way to override those headers?
>> I tried to do directly in the HTML as a META tags, but doesn't work
>> either.
>>
>> or there are a better way to bypass this problem?? (not using IE is not
>> an
>> option)
>>
>> Thanks in advance for any information you can provide.
>>
>> Alexa
>> --
>> 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-tp22519881p22519881.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
--
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-tp22519881p22551521.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
RE: Wicket Application bypassing- Internet Explorer file downloads over SSL do not work with the cache control headers
Posted by Anirban Basak <an...@rebaca.com>.
Use Apache HTTPD for handling external components. Alternatively you may use
httpd as web server and delegate incoming requests (for wicket app!) to app
server via AJP. HTPD provides great control over response (setting cache
control in your case!). I always prefer HTTPD mounted external contents
(image, files etc.).
Warm Regards,
Anirban Basak
Ph : 91 33 2357 7177 Extn: 277
-----Original Message-----
From: Igor Vaynberg [mailto:igor.vaynberg@gmail.com]
Sent: Sunday, March 15, 2009 11:08 AM
To: users@wicket.apache.org
Subject: Re: Wicket Application bypassing- Internet Explorer file downloads
over SSL do not work with the cache control headers
external links do not use a wicket callback, you have to install a
filter that intercepts those urls and sets the headers
-igor
On Sat, Mar 14, 2009 at 10:11 PM, Alexita <ct...@hotmail.com> wrote:
>
> Hi,
> I have a basic Internet banking application developed in wicket,
everything
> works fine on test, but in production with https, all links which try to
> download a pdf were broken. That's an IE bug, but Microsoft is not
> interested in fixing it(all other browsers work ok).
>
> I know the solution is set the response headers as follows:
> response.setHeader("Cache-Control", "must-revalidate");
> response.setHeader( "Pragma", "public" );
>
> Wicket allows to override response's headers (setHeaders(WebResponse
> response)) but only for "webpage" subclasses.
>
> I using ExternalLinks added to a form not related at all with the webPage,
> There's any way to override those headers?
> I tried to do directly in the HTML as a META tags, but doesn't work
either.
>
> or there are a better way to bypass this problem?? (not using IE is not an
> option)
>
> Thanks in advance for any information you can provide.
>
> Alexa
> --
> View this message in context:
http://www.nabble.com/Wicket-Application-bypassing--Internet-Explorer-file-d
ownloads-over-SSL-do-not-work-with-the-cache-control-headers%E2%80%8F-tp2251
9881p22519881.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.0.237 / Virus Database: 270.11.13/1999 - Release Date: 03/13/09
05:59:00
No virus found in this outgoing message.
Checked by AVG - www.avg.com
Version: 8.0.237 / Virus Database: 270.11.13/1999 - Release Date: 03/15/09
14:07:00
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Wicket Application bypassing- Internet Explorer file downloads over SSL do not work with the cache control headers
Posted by Igor Vaynberg <ig...@gmail.com>.
external links do not use a wicket callback, you have to install a
filter that intercepts those urls and sets the headers
-igor
On Sat, Mar 14, 2009 at 10:11 PM, Alexita <ct...@hotmail.com> wrote:
>
> Hi,
> I have a basic Internet banking application developed in wicket, everything
> works fine on test, but in production with https, all links which try to
> download a pdf were broken. That's an IE bug, but Microsoft is not
> interested in fixing it(all other browsers work ok).
>
> I know the solution is set the response headers as follows:
> response.setHeader("Cache-Control", "must-revalidate");
> response.setHeader( "Pragma", "public" );
>
> Wicket allows to override response's headers (setHeaders(WebResponse
> response)) but only for "webpage" subclasses.
>
> I using ExternalLinks added to a form not related at all with the webPage,
> There's any way to override those headers?
> I tried to do directly in the HTML as a META tags, but doesn't work either.
>
> or there are a better way to bypass this problem?? (not using IE is not an
> option)
>
> Thanks in advance for any information you can provide.
>
> Alexa
> --
> 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-tp22519881p22519881.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org