Skip to content

Commit

Permalink
shut up warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
tokuhirom committed Sep 6, 2009
1 parent 24378de commit 29157cf
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 2 deletions.
1 change: 0 additions & 1 deletion lib/PlackX/Request.pm
Expand Up @@ -79,7 +79,6 @@ has secure => (
sub _build_secure {
my $self = shift;

no warnings; # TODO: remove this after fix test.
if ( $self->env->{'psgi.url_scheme'} eq 'https' ) {
return 1;
}
Expand Down
1 change: 1 addition & 0 deletions t/Utils.pm
Expand Up @@ -15,6 +15,7 @@ sub req {
'psgi.input' => $in,
'psgi.errors' => *STDERR,
'psgi.url_scheme' => 'http',
SERVER_PORT => 80,
%{ delete($args{env}) || +{} },
};
PlackX::Request->new($env, %args);
Expand Down
1 change: 1 addition & 0 deletions t/from_httpengine/request-many_upload.t
Expand Up @@ -52,6 +52,7 @@ do {
CONTENT_TYPE => 'multipart/form-data; boundary=----BOUNDARY',
REQUEST_METHOD => 'POST',
SCRIPT_NAME => '/',
SERVER_PORT => 80,
}
);
my $tempdir = tempdir( CLEANUP => 1 );
Expand Down
3 changes: 3 additions & 0 deletions t/from_httpengine/request-secure.t
Expand Up @@ -22,6 +22,7 @@ __END__
--- env
HTTP_HOST: example.com
psgi.url_scheme: https
SERVER_PORT: 443
--- is_secure: "1"
--- uri: https://example.com/
--- port: 443
Expand All @@ -30,6 +31,7 @@ __END__
--- env
HTTP_HOST: example.com
psgi.url_scheme: http
SERVER_PORT: 80
--- is_secure: "0"
--- uri: http://example.com/
--- port: 80
Expand All @@ -38,6 +40,7 @@ __END__
--- env
HTTP_HOST: example.com
psgi.url_scheme: http
SERVER_PORT: 80
--- is_secure: "0"
--- uri: http://example.com/
--- port: 80
Expand Down
2 changes: 1 addition & 1 deletion t/from_httpengine/request-uri.t
Expand Up @@ -15,7 +15,7 @@ filters {

run {
my $block = shift;
my $env = {};
my $env = {SERVER_PORT => 80};
if ($block->add_env && ref($block->add_env) eq 'HASH') {
while (my($key, $val) = each %{ $block->add_env }) {
$env->{$key} = $val;
Expand Down

0 comments on commit 29157cf

Please sign in to comment.