summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Woodward2010-07-12 21:58:26 -0400
committerJason Woodward2010-07-12 21:58:26 -0400
commit49f0fa328a2c6f52016c76caed6a97b21fb48b64 (patch)
tree02bd59ba4e4b487e19f79c4dbc12da21beefa428
parentce9d9b103e018932d5ddc7524025b2ec8d8f6f1e (diff)
downloadJaos-WebApp-49f0fa328a2c6f52016c76caed6a97b21fb48b64.tar.gz
fix duplicate slashes in url generation
-rw-r--r--lib/Jaos/WebApp/Controller.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Jaos/WebApp/Controller.pm b/lib/Jaos/WebApp/Controller.pm
index d0148a0..a57cf6f 100644
--- a/lib/Jaos/WebApp/Controller.pm
+++ b/lib/Jaos/WebApp/Controller.pm
@@ -23,7 +23,8 @@ sub url_for
my($self, $path, $args) = @_;
my $uri = $self->{app}->req->base;
- $uri->path($uri->path . $path);
+ (my $url_path = $uri->path . $path) =~ s|//|/|g;
+ $uri->path($url_path);
$uri->query_form(@$args) if $args;
$uri;