Fixed $c->request->cookie, and improved detection of registry scripts
Christian Hansen [Fri, 1 Jul 2005 17:06:26 +0000 (17:06 +0000)]
lib/Catalyst/Engine/Apache/Base.pm
lib/Catalyst/Request.pm
lib/Catalyst/Test.pm

index ce4b33f..ebb3148 100644 (file)
@@ -118,7 +118,7 @@ sub prepare_path {
 
         $path =~ s/^\///;
 
-        if ( $c->apache->filename && -x $c->apache->filename ) {
+        if ( $c->apache->filename && -f $c->apache->filename && -x _ ) {
 
             my $filename = ( File::Spec->splitpath( $c->apache->filename ) )[2];
 
index ded852a..6611255 100644 (file)
@@ -38,6 +38,7 @@ Catalyst::Request - Catalyst Request Class
     $req->content_encoding;
     $req->content_length;
     $req->content_type;
+    $req->cookie;
     $req->cookies;
     $req->header;
     $req->headers;
@@ -130,18 +131,18 @@ sub cookie {
     my $self = shift;
 
     if ( @_ == 0 ) {
-        return keys %{ $self->cookie };
+        return keys %{ $self->cookies };
     }
 
     if ( @_ == 1 ) {
 
         my $name = shift;
 
-        unless ( exists $self->cookie->{$name} ) {
+        unless ( exists $self->cookies->{$name} ) {
             return undef;
         }
         
-        return $self->cookie->{$name};
+        return $self->cookies->{$name};
     }
 }
 
index b7fdb6d..23d4f40 100644 (file)
@@ -105,7 +105,7 @@ my $agent;
 
 =item remote_request
 
-Do an actual remote rquest using LWP.
+Do an actual remote request using LWP.
 
 =cut