Return-Path: X-Original-To: apmail-activemq-commits-archive@www.apache.org Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 637B0EBEF for ; Wed, 30 Jan 2013 17:53:52 +0000 (UTC) Received: (qmail 24752 invoked by uid 500); 30 Jan 2013 17:53:52 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 24733 invoked by uid 500); 30 Jan 2013 17:53:52 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 24725 invoked by uid 99); 30 Jan 2013 17:53:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Jan 2013 17:53:52 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_FILL_THIS_FORM_SHORT X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Jan 2013 17:53:49 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 3500123888CD; Wed, 30 Jan 2013 17:53:30 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1440558 - in /activemq/activemq-apollo/trunk/apollo-web/src/main: scala/org/apache/activemq/apollo/web/StaticContentFilter.scala webapp/console/js/app.js Date: Wed, 30 Jan 2013 17:53:30 -0000 To: commits@activemq.apache.org From: chirino@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130130175330.3500123888CD@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: chirino Date: Wed Jan 30 17:53:29 2013 New Revision: 1440558 URL: http://svn.apache.org/viewvc?rev=1440558&view=rev Log: Disable caching of dynamic content and make sure the session id is passed along in ajax requests. Modified: activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/StaticContentFilter.scala activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/console/js/app.js Modified: activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/StaticContentFilter.scala URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/StaticContentFilter.scala?rev=1440558&r1=1440557&r2=1440558&view=diff ============================================================================== --- activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/StaticContentFilter.scala (original) +++ activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/StaticContentFilter.scala Wed Jan 30 17:53:29 2013 @@ -78,6 +78,10 @@ class StaticContentFilter extends Filter if (static_content_exists(req)) { static_content_servlet.service(req, res) } else { + // not static content? then it must be dynamic, lets default + // headers so that results are not cached by the browser. + res.setHeader("Cache-Control", "max-age=0, no-cache, must-revalidate, proxy-revalidate, private") + res.setHeader("Pragma", "no-cache") chain.doFilter(req, res) } case _ => chain.doFilter(req, res) Modified: activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/console/js/app.js URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/console/js/app.js?rev=1440558&r1=1440557&r2=1440558&view=diff ============================================================================== --- activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/console/js/app.js (original) +++ activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/console/js/app.js Wed Jan 30 17:53:29 2013 @@ -150,6 +150,9 @@ App = Em.Application.create({ headers: { AuthPrompt:'false', }, + xhrFields: { + withCredentials: true + }, dataType: 'json', success: function(data, textStatus, jqXHR){ App.BrokerController.set("offline", false); @@ -219,6 +222,9 @@ App.LoginController = Em.Controller.crea headers: { AuthPrompt:'false', }, + xhrFields: { + withCredentials: true + }, data:{ username: username, password: password @@ -801,6 +807,9 @@ App.ConfigurationController = Ember.Cont headers: { AuthPrompt:'false', }, + xhrFields: { + withCredentials: true + }, headers: { "Accept":"application/octet-stream", },