Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fixed small bug where Hypnotoad would ignore the MOJO_REVERSE_PROXY e…
…nvironment variable
  • Loading branch information
kraih committed Mar 25, 2012
1 parent 01ec0c8 commit 6eeff54
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 15 deletions.
2 changes: 2 additions & 0 deletions Changes
Expand Up @@ -4,6 +4,8 @@ This file documents the revision history for Perl extension Mojolicious.
- Improved Mojo::DOM::CSS performance.
- Improved documentation.
- Improved Mojo::Reactor tests to be less strict.
- Fixed small bug where Hypnotoad would ignore the MOJO_REVERSE_PROXY
environment variable.

2.68 2012-03-24
- Improved documentation.
Expand Down
10 changes: 4 additions & 6 deletions lib/Mojo/Server/Hypnotoad.pm
Expand Up @@ -149,18 +149,16 @@ sub _config {
$c->{workers} ||= 4;

# Daemon settings
$ENV{MOJO_REVERSE_PROXY} = $c->{proxy};
$ENV{MOJO_REVERSE_PROXY} = $c->{proxy} if defined $c->{proxy};
my $daemon = $self->{daemon};
$daemon->backlog($c->{backlog}) if defined $c->{backlog};
$daemon->max_clients($c->{clients} || 1000);
$daemon->group($c->{group}) if $c->{group};
$daemon->group($c->{group}) if defined $c->{group};
$daemon->max_requests($c->{keep_alive_requests} || 25);
$daemon->inactivity_timeout($c->{inactivity_timeout} || 15);
$daemon->user($c->{user}) if $c->{user};
$daemon->user($c->{user}) if defined $c->{user};
$daemon->ioloop->max_accepts($c->{accepts} || 1000);
my $listen = $c->{listen} || ['http://*:8080'];
$listen = [$listen] unless ref $listen;
$daemon->listen($listen);
$daemon->listen($c->{listen} || ['http://*:8080']);
}

sub _exit { say shift and exit 0 }
Expand Down
9 changes: 0 additions & 9 deletions lib/Test/Mojo.pm
Expand Up @@ -199,15 +199,6 @@ sub json_hasnt {
return $self;
}

# DEPRECATED in Leaf Fluttering In Wind!
sub max_redirects {
warn "Test::Mojo->max_redirects is DEPRECATED!\n";
my $self = shift;
return $self->ua->max_redirects unless @_;
$self->ua->max_redirects(@_);
return $self;
}

sub message_is {
my ($self, $value, $desc) = @_;
local $Test::Builder::Level = $Test::Builder::Level + 1;
Expand Down

0 comments on commit 6eeff54

Please sign in to comment.