Skip to content

Commit

Permalink
Set default host in MockHTTP. Only set scheme/host when there's nothi…
Browse files Browse the repository at this point in the history
…ng set
  • Loading branch information
miyagawa committed Dec 16, 2009
1 parent 7ca8a9c commit 3f73886
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Plack/Test/MockHTTP.pm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ sub test_psgi {

my $cb = sub {
my $req = shift;
$req->uri->scheme('http');
$req->uri->scheme('http') unless defined $req->uri->scheme;
$req->uri->host('localhost') unless defined $req->uri->host;
my $env = $req->to_psgi;
my $res;
try {
Expand Down

0 comments on commit 3f73886

Please sign in to comment.