[Jifty-commit] r3613 - in jifty/trunk: lib/Jifty/Test/WWW lib/Jifty/View/Declare lib/Jifty/Web

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Fri Jul 6 19:05:11 EDT 2007


Author: trs
Date: Fri Jul  6 19:05:11 2007
New Revision: 3613

Modified:
   jifty/trunk/   (props changed)
   jifty/trunk/lib/Jifty/Test/WWW/Mechanize.pm
   jifty/trunk/lib/Jifty/View/Declare/Page.pm
   jifty/trunk/lib/Jifty/Web/Session.pm

Log:
 r25037 at zot:  tom | 2007-07-06 19:04:08 -0400
 - Fix our test mech to not choke on non-default cookie names
 - Clean up page headers
 - Remove unecessary var


Modified: jifty/trunk/lib/Jifty/Test/WWW/Mechanize.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Test/WWW/Mechanize.pm	(original)
+++ jifty/trunk/lib/Jifty/Test/WWW/Mechanize.pm	Fri Jul  6 19:05:11 2007
@@ -436,7 +436,10 @@
 sub session {
     my $self = shift;
 
-    return undef unless $self->cookie_jar->as_string =~ /JIFTY_SID_\d+=([^;]+)/;
+    my $cookie = Jifty->config->framework('Web')->{'SessionCookieName'};
+    $cookie =~ s/\$PORT/(?:\\d+|NOPORT)/g;
+
+    return undef unless $self->cookie_jar->as_string =~ /$cookie=([^;]+)/;
 
     my $session = Jifty::Web::Session->new;
     $session->load($1);

Modified: jifty/trunk/lib/Jifty/View/Declare/Page.pm
==============================================================================
--- jifty/trunk/lib/Jifty/View/Declare/Page.pm	(original)
+++ jifty/trunk/lib/Jifty/View/Declare/Page.pm	Fri Jul  6 19:05:11 2007
@@ -49,8 +49,8 @@
 
     Template::Declare->new_buffer_frame;
     outs_raw(
-        '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'
-      . '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">' );
+        '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">' . "\n"
+      . '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">' . "\n" );
 
     $self->_render_header($self->_title || Jifty->config->framework('ApplicationName'));
 

Modified: jifty/trunk/lib/Jifty/Web/Session.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Web/Session.pm	(original)
+++ jifty/trunk/lib/Jifty/Web/Session.pm	Fri Jul  6 19:05:11 2007
@@ -284,8 +284,6 @@
 
     my $cookie_name = $self->cookie_name;
     my %cookies     = CGI::Cookie->fetch();
-    my $session_id
-        = $cookies{$cookie_name} ? $cookies{$cookie_name}->value() : undef;
     my $cookie = new CGI::Cookie(
         -name    => $cookie_name,
         -value   => $self->id,


More information about the Jifty-commit mailing list