You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2004/04/22 21:04:03 UTC

DO NOT REPLY [Bug 28544] New: - processNoCache() method does not expire properly

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=28544>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=28544

processNoCache() method does not expire properly

           Summary: processNoCache() method does not expire properly
           Product: Struts
           Version: Nightly Build
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Controller
        AssignedTo: dev@struts.apache.org
        ReportedBy: corporate_gadfly@hotmail.com


processNoCache() method does not expire properly.

The Cache-Control header is set by processNoCache() method in RequestProcessor
as follows:
            response.setHeader("Cache-Control", "no-cache");
With IE everything is fine. Hitting the back button works wonderfully and if the
previous request was a GET it would be "re GOTTEN" and if it was a POST, it
displays the "POST data has expired warning. U wanna resubmit?" dialog.

However, for some other browsers, it doesn't quite work.

In Galeon and mozilla, regardless of whether the HTTP request was a POST or a
GET, hitting the back button shows the previous screen in its original glory
(not good).

I made a slight tweak and over-rode the processNoCache() method in "my
RequestProcessor" (which incidentally overrides TilesRP). Inside this
overriddent, I changed the Cache-Control setting to:
            response.setHeader("Cache-Control", "no-cache,no-store,max-age=0");

After this IE, galeon, mozilla, netscape 7, all were correctly either re-GETting
the GET request or posting a warning about re-POSTing the POST request when the
back button was hit.

Could this modification be made directly in
src/share/org/apache/struts/action/RequestProcessor.java, please? I don't see
any side-effects (yet :-)).

I see from the annotation history that this line has been in this file since the
intial commit (2 years, 3 months ago) done by craigmcc. Craig, do you have any
thoughts?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org