Fixed bug where req->base and req->uri would include ':443' when in SSL mode
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Dispatcher.pm
index 7f201c2..ca5bc25 100644 (file)
@@ -282,7 +282,7 @@ sub prepare_action {
         unshift @args, $arg;
     }
 
-    s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg for @{$c->req->captures||[]};
+    s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg for grep { defined } @{$c->req->captures||[]};
 
     $c->log->debug( 'Path is "' . $c->req->match . '"' )
       if ( $c->debug && $c->req->match );