~ubuntu-branches/ubuntu/utopic/libhttp-request-ascgi-perl/utopic

« back to all changes in this revision

Viewing changes to t/05env.t

  • Committer: Bazaar Package Importer
  • Author(s): Krzysztof Krzyżaniak (eloy), Krzysztof Krzyżaniak (eloy), gregor herrmann
  • Date: 2009-04-28 23:25:26 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20090428232526-ka2wb18isrkzh49x
Tags: 0.9-1
[ Krzysztof Krzyżaniak (eloy) ]
* New upstream release
* debian/rules: converte to new schema
* debian/control: Standards-Version update to 3.8.1
* update package to debhelper 7, use debian/rules from debhelper 7

[ gregor herrmann ]
* debian/watch: use dist-based URL.
* debian/control: Changed: Switched Vcs-Browser field to ViewSVN
  (source stanza).

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
use HTTP::Request;
9
9
use HTTP::Request::AsCGI;
10
10
 
11
 
my $r = HTTP::Request->new( GET => 'http://www.host.com/cgi-bin/script.cgi/my/path/?a=1&b=2', [ 'X-Test' => 'Test' ] );
 
11
my $r = HTTP::Request->new( GET => 'http://www.host.com/cgi-bin/script.cgi/my%20path%2F?a=1&b=2', [ 'X-Test' => 'Test' ] );
12
12
my %e = ( SCRIPT_NAME => '/cgi-bin/script.cgi' );
13
13
my $c = HTTP::Request::AsCGI->new( $r, %e );
14
14
$c->stdout(undef);
18
18
is( $ENV{GATEWAY_INTERFACE}, 'CGI/1.1', 'GATEWAY_INTERFACE' );
19
19
is( $ENV{HTTP_HOST}, 'www.host.com:80', 'HTTP_HOST' );
20
20
is( $ENV{HTTP_X_TEST}, 'Test', 'HTTP_X_TEST' );
21
 
is( $ENV{PATH_INFO}, '/my/path/', 'PATH_INFO' );
 
21
is( $ENV{PATH_INFO}, '/my path%2F', 'PATH_INFO' );
22
22
is( $ENV{QUERY_STRING}, 'a=1&b=2', 'QUERY_STRING' );
23
23
is( $ENV{SCRIPT_NAME}, '/cgi-bin/script.cgi', 'SCRIPT_NAME' );
24
24
is( $ENV{REQUEST_METHOD}, 'GET', 'REQUEST_METHOD' );