Skip to content

Commit

Permalink
only update application if necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Nov 26, 2012
1 parent b038e9b commit a6d4120
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/Mojo/UserAgent.pm
Expand Up @@ -431,11 +431,11 @@ sub _server {
sub _start {
my ($self, $tx, $cb) = @_;

# Embedded server (only start if necessary)
# Embedded server (update application if necessary)
my $req = $tx->req;
my $url = $req->url;
if ($self->app && ($self->{port} || !$url->is_abs)) {
$self->_server->app($self->app);
if ($self->{port} || !$url->is_abs) {
if (my $app = $self->app) { $self->_server->app($app) }
$url = $req->url($url->base($self->app_url)->to_abs)->url
unless $url->is_abs;
}
Expand Down

0 comments on commit a6d4120

Please sign in to comment.