You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Alejandro Abdelnur (JIRA)" <ji...@apache.org> on 2012/11/14 17:30:14 UTC

[jira] [Updated] (HADOOP-6607) Add different variants of non caching HTTP headers

     [ https://issues.apache.org/jira/browse/HADOOP-6607?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alejandro Abdelnur updated HADOOP-6607:
---------------------------------------

    Summary: Add different variants of non caching HTTP headers  (was: Proxies can cache some of the Hadoop servlet/JSP pages)

Updating the summary to reflect new scope, to handle HTTP/1.0. This is a follow up on HADOOP-8998 (which only added HTTP/1.1 non-cache header.

Also, we should fix the '*' import introduced in HttpServer in HADOOP-8998.
                
> Add different variants of non caching HTTP headers
> --------------------------------------------------
>
>                 Key: HADOOP-6607
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6607
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: io
>    Affects Versions: 0.22.0
>            Reporter: Steve Loughran
>            Assignee: Alejandro Abdelnur
>            Priority: Minor
>         Attachments: HADOOP-6607.patch, NoCachingFilter.java
>
>
> 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
> # Every servlet should set a short expires header and disable caching, especially in proxies. 
> # JSP pages should do it to
> # It's essential that error responses do it.
> Maybe this could be done in a filter. Otherwise something like
> {code}
>     /**
>      * 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");
>     }
> {code}
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira