[ 
https://issues.apache.org/jira/browse/WICKET-5372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13782425#comment-13782425
 ] 

Brandon Fuller commented on WICKET-5372:
----------------------------------------

Actually, I found it fairly difficult to override the default headers.  They 
are defined in WebResponse.  And there is factory method in WebApplication for 
using your own class, newWebResponse.  I did that but got nowhere.  Later I 
learned that the responses actually get wrapped by a HeaderBufferingWebResponse 
in createWebResponse and that class is a sub-class of WebResponse, proper.  Not 
the one I defined in the factory method in WebApplication.  So I couldn't 
define my own headers.  My workaround was to set the cache duration to 1 second.

The cache is disabled for this resource by the JRResource class of wicketstuff. 
You can see it on line 387:

http://grepcode.com/file/repo1.maven.org/maven2/org.wicketstuff/wicketstuff-jasperreports/6.9.0/org/wicketstuff/jasperreports/JRResource.java?av=f#387

> Cache Disable Headers Break IE8 Under HTTPS
> -------------------------------------------
>
>                 Key: WICKET-5372
>                 URL: https://issues.apache.org/jira/browse/WICKET-5372
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.9.0
>            Reporter: Brandon Fuller
>            Priority: Minor
>
> I am serving up a non-cached PDF resource from Wicket with:
> getRequestCycle().scheduleRequestHandlerAfterCurrent(new 
> ResourceRequestHandler(pdfResource, null));
> All is fine for most users.  However, our IE8 users cannot perform the 
> download.  The get a dialog saying that the resource cannot be downloaded.  I 
> did some testing and found that it works fine over HTTP but not HTTPS.
> I found this stack overflow article that explains:
> http://stackoverflow.com/questions/1038707/cant-display-pdf-from-https-in-ie-8-on-64-bit-vista
> I see in WebResponse that Wicket is setting the Cache-Control and Pragma 
> values incorrectly as far as IE8 is concerned.  This explains the behavior.
> To prove, I changed the resource in wicket to have a cache duration of one 
> second and the resource downloads over SSL just fine.  Not the worst 
> workaround but I was hoping this could be addressed.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to