Details

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

      Description

      None of the JSP pages disable caching. This is bad for long-haul diagnostics, as proxy servers may cache the content. Even if the remote cluster is down, the proxy may return the last-good status page showing all is well.

        Issue Links

          Activity

          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Resolved Resolved
          2178d 6h 12m 1 Allen Wittenauer 18/Jul/14 21:01
          Allen Wittenauer made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Duplicate [ 3 ]
          Allen Wittenauer made changes -
          Link This issue is duplicated by HADOOP-8998 [ HADOOP-8998 ]
          Hide
          Allen Wittenauer added a comment -

          Fixed by HADOOP-8998.

          Show
          Allen Wittenauer added a comment - Fixed by HADOOP-8998 .
          Gavin made changes -
          Reporter Steve Loughran [ steve_l ] Steve Loughran [ stevel@apache.org ]
          Owen O'Malley made changes -
          Field Original Value New Value
          Project Hadoop Common [ 12310240 ] HDFS [ 12310942 ]
          Key HADOOP-3878 HDFS-91
          Affects Version/s 0.19.0 [ 12313211 ]
          Component/s dfs [ 12310710 ]
          Hide
          Steve Loughran added a comment -

          The test for this would be with httpclient or htmlunit -fetch the page, look for the headers.

          Show
          Steve Loughran added a comment - The test for this would be with httpclient or htmlunit -fetch the page, look for the headers.
          Hide
          Steve Loughran added a comment -

          to fix this inline, something like the following is needed:

          <%
          response.setHeader("Cache-Control", "no-cache");
          response.setHeader("Pragma", "no-cache");
          response.setHeader("Expires", "0");
          %>

          However, this just increases the amount of replicated java code across every JSP page.

          Better to have a JSP utils class which is bound to the various instances, and which can do this as part of a page init

          public class JspPageHelper {

          private HttpServletRequest request;
          private HttpServletResponse response;

          public JspPageHelper(HttpServletRequest request, HttpServletResponse response)

          { this.request = request; this.response = response; }

          public void initPage()

          { response.setHeader("Cache-Control", "no-cache"); response.setHeader("Pragma", "no-cache"); response.setHeader("Expires", "0"); }

          }

          This class could also do more of the jsp output, but then you'd need to have the JSP classes on the classpath; this should clearly go into a separate module under src/, have some tests, etc.

          Show
          Steve Loughran added a comment - to fix this inline, something like the following is needed: <% response.setHeader("Cache-Control", "no-cache"); response.setHeader("Pragma", "no-cache"); response.setHeader("Expires", "0"); %> However, this just increases the amount of replicated java code across every JSP page. Better to have a JSP utils class which is bound to the various instances, and which can do this as part of a page init public class JspPageHelper { private HttpServletRequest request; private HttpServletResponse response; public JspPageHelper(HttpServletRequest request, HttpServletResponse response) { this.request = request; this.response = response; } public void initPage() { response.setHeader("Cache-Control", "no-cache"); response.setHeader("Pragma", "no-cache"); response.setHeader("Expires", "0"); } } This class could also do more of the jsp output, but then you'd need to have the JSP classes on the classpath; this should clearly go into a separate module under src/, have some tests, etc.
          Steve Loughran created issue -

            People

            • Assignee:
              Unassigned
              Reporter:
              Steve Loughran
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development