Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-4083

WebResponse#enableCaching does not take care of a possible "Pragma: no-cache" header

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.5.1
    • Fix Version/s: 1.5.1
    • Component/s: wicket
    • Labels:
      None

      Description

      in WebResponse#enableCaching

      a call to setHeader("Pragma", "") might be a good idea to assure that no conflicting http header information is being sent out.

        Activity

        Hide
        pete Peter Ertl added a comment -

        It seems there is no corresponding counterpart for header value "no-cache". I don't like to elimimate an eventual "no-cache" value with an empty header like this:

        Pragma:

        Some (broken) servers could have a problem with that...

        Also

        setHeader("Pragma", null)

        works on jetty but could be fragile on some others servlet containers.

        Also there's no way in the servlet api to remove an header completely. So I will add

        Pragma: cache

        which clearly signal our intention. Even in the case of an unknown value it will not hurt.

        @Rodolfo: Thanks for reporting!

        Show
        pete Peter Ertl added a comment - It seems there is no corresponding counterpart for header value "no-cache". I don't like to elimimate an eventual "no-cache" value with an empty header like this: Pragma: Some (broken) servers could have a problem with that... Also setHeader("Pragma", null) works on jetty but could be fragile on some others servlet containers. Also there's no way in the servlet api to remove an header completely. So I will add Pragma: cache which clearly signal our intention. Even in the case of an unknown value it will not hurt. @Rodolfo: Thanks for reporting!

          People

          • Assignee:
            pete Peter Ertl
            Reporter:
            rhansen Rodolfo Hansen
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development