Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-6607

Add different variants of non caching HTTP headers

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.22.0
    • Fix Version/s: 2.0.3-alpha
    • Component/s: io
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      I'm suffering from proxy servers that are caching some of the HttpResponses that Hadoop generates in servlets/JSP pages. While the web ui is up to date, some of my build files are failing to pull stuff down because that is going via proxy -it sees an error page rather than the data

      1. Every servlet should set a short expires header and disable caching, especially in proxies.
      2. JSP pages should do it to
      3. It's essential that error responses do it.

      Maybe this could be done in a filter. Otherwise something like

          /**
           * Turn off caching and say that the response expires now
           * @param response the response
           */
          protected void disableCaching(HttpServletResponse response) {
              response.addDateHeader("Expires", System.currentTimeMillis());
              response.addHeader("Cache-Control", "no-cache");
              response.addHeader("Pragma", "no-cache");
          }
      

      Before anyone rushes to do this, we should consult some HTTP experts in Yahoo! or Facebook to get the options right. It may be best to have, say, a 1s lifespan on everything.

        Attachments

        1. HADOOP-6607.patch
          3 kB
          Alejandro Abdelnur
        2. HADOOP-6607.patch
          3 kB
          Alejandro Abdelnur
        3. NoCachingFilter.java
          2 kB
          Steve Loughran

        Issue Links

          Activity

            People

            • Assignee:
              tucu00 Alejandro Abdelnur
              Reporter:
              stevel@apache.org Steve Loughran

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment