~ubuntu-branches/ubuntu/edgy/libapache2-mod-perl2/edgy

« back to all changes in this revision

Viewing changes to t/response/TestAPR/sockaddr.pm

  • Committer: Bazaar Package Importer
  • Author(s): Andres Salomon
  • Date: 2005-08-12 01:40:38 UTC
  • mfrom: (1.1.2 upstream) (2.1.1 sarge)
  • Revision ID: james.westby@ubuntu.com-20050812014038-gjigefs55pqx4qc8
Tags: 2.0.1-3
Grr.  Really include perl.conf file; it got lost due to diff not
wanting to add an empty file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
use Apache::Test;
9
9
use Apache::TestUtil;
10
10
 
11
 
use Apache::Connection ();
12
 
use Apache::RequestRec ();
 
11
use Apache2::Connection ();
 
12
use Apache2::RequestRec ();
13
13
use APR::SockAddr ();
14
14
 
15
 
use Apache::Const -compile => 'OK';
 
15
use Apache2::Const -compile => 'OK';
16
16
 
17
17
sub handler {
18
18
    my $r = shift;
23
23
    my $local  = $c->local_addr;
24
24
    my $remote = $c->remote_addr;
25
25
 
26
 
    ok t_cmp($c->local_ip,  $local->ip_get,  "local ip");
27
 
    ok t_cmp($c->remote_ip, $remote->ip_get, "remote ip");
 
26
    ok t_cmp($local->ip_get,  $c->local_ip,  "local ip");
 
27
    ok t_cmp($remote->ip_get, $c->remote_ip, "remote ip");
28
28
 
29
29
    $r->subprocess_env;
30
 
    ok t_cmp($ENV{SERVER_PORT}, $local->port,  "local port");
31
 
    ok t_cmp($ENV{REMOTE_PORT}, $remote->port, "remote port");
 
30
    ok t_cmp($local->port,  $ENV{SERVER_PORT}, "local port");
 
31
    ok t_cmp($remote->port, $ENV{REMOTE_PORT}, "remote port");
32
32
 
33
 
    Apache::OK;
 
33
    Apache2::Const::OK;
34
34
}
35
35
 
36
36
1;