summaryrefslogtreecommitdiffabout
path: root/t/MockHttpd.pm
blob: 2fcff6d516c337525f24edf3dd7f08a8acaaaa21 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
package MockHttpd;
use strict;
use warnings;

unless (caller) {
    my $arg = shift @ARGV;
    if ($arg && !@ARGV) {
	if ($arg eq '-V') {
	    version();
	    exit(0);
	} elsif ($arg eq '-l') {
	    modules();
	    exit(0);
	}
    }
    print STDERR $0 . ' ' . __PACKAGE__ . " -l | -V\n";
    exit(1);
}    

sub version {
    print <<'EOT';
Server version: Apache/2.4.6 (Unix)
Server built:   Aug  5 2013 16:32:54
Server's Module Magic Number: 20120211:23
Server loaded:  APR 1.4.6, APR-UTIL 1.5.1
Compiled using: APR 1.4.6, APR-UTIL 1.5.1
Architecture:   64-bit
Server MPM:     event
  threaded:     yes (fixed thread count)
    forked:     yes (variable process count)
Server compiled with....
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=256
 -D HTTPD_ROOT="/usr"
 -D SUEXEC_BIN="/usr/bin/suexec"
 -D DEFAULT_PIDLOG="/var/run/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="/etc/httpd/mime.types"
 -D SERVER_CONFIG_FILE="/etc/httpd/httpd.conf"
EOT
;
    if ($ENV{MOCK_HTTPD_CATCH}) {
        print " -D MOCK_HTTPD_CATCH=\"$ENV{MOCK_HTTPD_CATCH}\"\n";
    }
}

sub modules {
    print <<'EOT';
Compiled in modules:
  core.c
  mod_so.c
  http_core.c
  mod_cgi.c
EOT
;
}

1;

Return to:

Send suggestions and report system problems to the System administrator.