Actually try to use the code in anger, fix issues
Tomas Doran (t0m) [Mon, 13 Jul 2009 16:30:30 +0000 (17:30 +0100)]
Changes
lib/Catalyst/TraitFor/Request/ProxyBase.pm

diff --git a/Changes b/Changes
index f611bad..570d1ff 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,3 +1,6 @@
+0.000002
+
+ - Always apply the Request base to $c->req->base, not just on assignment.
 
 0.000001
 
index cc9961d..80faefb 100644 (file)
@@ -3,7 +3,7 @@ use Moose::Role;
 use URI ();
 use namespace::autoclean;
 
-our $VERSION = '0.000001';
+our $VERSION = '0.000002';
 
 requires qw/
     base
@@ -12,11 +12,9 @@ requires qw/
 
 around 'base' => sub {
     my ($orig, $self, @args) = @_;
-    if (scalar @args) {
-        if (my $base = $self->header('X-Request-Base')) {
-            $base .= '/' unless $base =~ m|/$|;
-            @args = (URI->new($base));
-        }
+    if (my $base = $self->header('X-Request-Base')) {
+        $base .= '/' unless $base =~ m|/$|;
+        @args = (URI->new($base));
     }
     $self->$orig(@args);
 };