summaryrefslogtreecommitdiff
path: root/cpan
diff options
context:
space:
mode:
authorCraig A. Berry <craigberry@mac.com>2012-02-14 19:09:52 -0600
committerCraig A. Berry <craigberry@mac.com>2012-02-14 19:09:52 -0600
commit138e1af697b1745fab0f8cc0275773ca0f138d39 (patch)
tree6a653b0d82912628bf21c305dd64cb8dc1040013 /cpan
parent5d103fec94a383c3e6812c3cb735356fffe54e7c (diff)
downloadperl-138e1af697b1745fab0f8cc0275773ca0f138d39.tar.gz
Fix CGI's url.t test for VMS.
Awaiting upstream integration at: https://rt.cpan.org/Public/Bug/Display.html?id=72380
Diffstat (limited to 'cpan')
-rw-r--r--cpan/CGI/t/url.t25
1 files changed, 14 insertions, 11 deletions
diff --git a/cpan/CGI/t/url.t b/cpan/CGI/t/url.t
index 6ca229801d..4572ef4bdd 100644
--- a/cpan/CGI/t/url.t
+++ b/cpan/CGI/t/url.t
@@ -25,20 +25,23 @@ is url() => 'http://proxy', 'url() with default port';
subtest 'rewrite_interactions' => sub {
# Reference: RT#45019
- local %ENV = (
- # These two are always set
- 'SCRIPT_NAME' => '/real/cgi-bin/dispatch.cgi',
- 'SCRIPT_FILENAME' => '/home/mark/real/path/cgi-bin/dispatch.cgi',
+ local $ENV{HTTP_X_FORWARDED_HOST} = undef;
+ local $ENV{SERVER_PROTOCOL} = undef;
+ local $ENV{SERVER_PORT} = undef;
+ local $ENV{SERVER_NAME} = undef;
- # These two are added by mod_rewrite Ref: http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html
+ # These two are always set
+ local $ENV{'SCRIPT_NAME'} = '/real/cgi-bin/dispatch.cgi';
+ local $ENV{'SCRIPT_FILENAME'} = '/home/mark/real/path/cgi-bin/dispatch.cgi';
- 'SCRIPT_URL' => '/real/path/info',
- 'SCRIPT_URI' => 'http://example.com/real/path/info',
+ # These two are added by mod_rewrite Ref: http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html
- 'PATH_INFO' => '/path/info',
- 'REQUEST_URI' => '/real/path/info',
- 'HTTP_HOST' => 'example.com'
- );
+ local $ENV{'SCRIPT_URL'} = '/real/path/info';
+ local $ENV{'SCRIPT_URI'} = 'http://example.com/real/path/info';
+
+ local $ENV{'PATH_INFO'} = '/path/info';
+ local $ENV{'REQUEST_URI'} = '/real/path/info';
+ local $ENV{'HTTP_HOST'} = 'example.com';
my $q = CGI->new;