aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/Catalyst/Plugin
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2012-05-23 17:39:00 +0100
committerStruan Donald <struan@exo.org.uk>2012-05-23 17:39:00 +0100
commit7cb6bb21f713bc07a06ece5f4109cd6bd5a7f0b0 (patch)
treeeaff3aa286d8e1910b33c204c79b6837e109a216 /perllib/Catalyst/Plugin
parent9019fda388f9232181387e8cce1d28e8b89de1ee (diff)
parent3b0e39a4c89e4c184f30c6131936dc63845d6a1f (diff)
Merge remote-tracking branch 'origin/master' into phonegap
Diffstat (limited to 'perllib/Catalyst/Plugin')
-rw-r--r--perllib/Catalyst/Plugin/Session/State/Cookie.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/perllib/Catalyst/Plugin/Session/State/Cookie.pm b/perllib/Catalyst/Plugin/Session/State/Cookie.pm
index c4b61123b..e0a651ed9 100644
--- a/perllib/Catalyst/Plugin/Session/State/Cookie.pm
+++ b/perllib/Catalyst/Plugin/Session/State/Cookie.pm
@@ -50,6 +50,10 @@ sub update_session_cookie {
sub cookie_is_rejecting {
my ( $c, $cookie ) = @_;
+ # Don't output cookie for JS or JPEG files. mySociety addition
+ return 1 if substr($c->request->path, -3) eq '.js'
+ || substr($c->request->path, -5) eq '.jpeg';
+
if ( $cookie->{path} ) {
return 1 if index '/'.$c->request->path, $cookie->{path};
}