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

« back to all changes in this revision

Viewing changes to t/response/TestApache/read.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:
3
3
use strict;
4
4
use warnings FATAL => 'all';
5
5
 
6
 
use Apache::RequestRec ();
7
 
use Apache::RequestIO ();
8
 
 
9
 
use Apache::Const -compile => 'OK';
 
6
use Apache2::RequestRec ();
 
7
use Apache2::RequestIO ();
 
8
 
 
9
use TestCommon::Utils;
 
10
 
 
11
use Apache2::Const -compile => 'OK';
10
12
 
11
13
use constant BUFSIZ => 512; #small for testing
12
14
 
29
31
        $offset += $read;
30
32
    }
31
33
 
32
 
    #make sure we dont block after all data is read
 
34
    die "read() has returned untainted data:"
 
35
        unless TestCommon::Utils::is_tainted($buffer);
 
36
 
 
37
    # make sure we dont block after all data is read
33
38
    my $n = $r->read(my $x, BUFSIZ);
34
39
    die unless $n == 0;
35
40
 
36
41
    $r->puts($buffer);
37
42
 
38
 
    Apache::OK;
 
43
    Apache2::Const::OK;
39
44
}
40
45
 
41
46
1;