Return-Path: X-Original-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9FCB7D8FF for ; Thu, 15 Nov 2012 10:50:14 +0000 (UTC) Received: (qmail 10778 invoked by uid 500); 15 Nov 2012 10:50:14 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 10735 invoked by uid 500); 15 Nov 2012 10:50:13 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-issues@hadoop.apache.org Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 10718 invoked by uid 99); 15 Nov 2012 10:50:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Nov 2012 10:50:13 +0000 Date: Thu, 15 Nov 2012 10:50:13 +0000 (UTC) From: "Steve Loughran (JIRA)" To: common-issues@hadoop.apache.org Message-ID: <606629650.118608.1352976613618.JavaMail.jiratomcat@arcas> Subject: [jira] [Commented] (HADOOP-6607) Add different variants of non caching HTTP headers MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HADOOP-6607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13497929#comment-13497929 ] Steve Loughran commented on HADOOP-6607: ---------------------------------------- +1, looks good. It'll probably still break against some random Netscape 3.x proxy or MS Windows Proxy somewhere in the field, but that's why nobody should be using them. > 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 > Fix For: 2.0.3-alpha > > Attachments: HADOOP-6607.patch, 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