From: Eric Prestemon Date: Fri, 17 Jul 2009 03:09:42 +0000 (-0700) Subject: Merge commit 'toms/master' X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=97aba997126fcc589de5e348a5a81a89b3e2c2cb;hp=-c;p=catagits%2FCatalyst-TraitFor-Request-ProxyBase.git Merge commit 'toms/master' --- 97aba997126fcc589de5e348a5a81a89b3e2c2cb diff --combined lib/Catalyst/TraitFor/Request/ProxyBase.pm index 0872718,80faefb..66197d5 --- a/lib/Catalyst/TraitFor/Request/ProxyBase.pm +++ b/lib/Catalyst/TraitFor/Request/ProxyBase.pm @@@ -3,7 -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 +12,9 @@@ 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); }; @@@ -35,7 -33,7 +33,7 @@@ __END_ =head1 NAME -Catalyst::TraitFor::Request::ProxyBase - +Catalyst::TraitFor::Request::ProxyBase - Replace request base with value passed by HTTP proxy =head1 SYNOPSIS