View | Details | Raw Unified | Return to bug 62186
Collapse All | Expand All

(-)t/apache/errordoc_method_logging.t (+34 lines)
Line 0 Link Here
1
use strict;
2
use warnings FATAL => 'all';
3
4
use Data::Dumper;
5
use Apache::Test;
6
use Apache::TestRequest;
7
use Apache::TestUtil qw/t_cmp
8
                        t_start_file_watch
9
                        t_finish_file_watch/;
10
11
Apache::TestRequest::module('error_document');
12
13
plan tests => 3, need_lwp;
14
15
{
16
    t_start_file_watch 'method_log';
17
18
    my $response = POST '/method_logging', content => 'does not matter';
19
    chomp(my $content = $response->content);
20
21
    ok t_cmp($response->code,
22
             404,
23
             'POST /method_logging, code');
24
25
    ok t_cmp($content,
26
             'Error 404 Test',
27
             'POST /method/logging, content');
28
29
    my @loglines = t_finish_file_watch 'method_log';
30
    chomp @loglines;
31
    ok t_cmp($loglines[0],
32
             qr/"POST \/method_logging HTTP\/1.1" .* method="POST"/,
33
             'POST /method/logging, log');
34
}
(-)t/conf/extra.conf.in (-1 / +9 lines)
Lines 742-748 Link Here
742
## 
742
## 
743
<VirtualHost _default_:error_document>
743
<VirtualHost _default_:error_document>
744
    ErrorDocument 404 "per-server 404
744
    ErrorDocument 404 "per-server 404
745
                                                                                                                             
745
    <IfModule mod_log_config.c>
746
        CustomLog logs/method_log "%h %l %u %t \"%r\" %>s %b method=\"%<m\""
747
        CustomLog logs/access_log "%h %l %u %t \"%r\" %>s %b"
748
    </IfModule>
749
746
    <Location /redefine>
750
    <Location /redefine>
747
        ErrorDocument 404 "per-dir 404
751
        ErrorDocument 404 "per-dir 404
748
    </Location>
752
    </Location>
Lines 760-765 Link Here
760
        ErrorDocument 404 default
764
        ErrorDocument 404 default
761
    </Location>
765
    </Location>
762
766
767
    <Location /method_logging>
768
        ErrorDocument 404 /apache/errordoc/404.html
769
    </Location>
770
763
    <Directory @DocumentRoot@/apache>
771
    <Directory @DocumentRoot@/apache>
764
         ErrorDocument 404 "testing merge
772
         ErrorDocument 404 "testing merge
765
    </Directory>
773
    </Directory>
(-)t/htdocs/apache/errordoc/404.html (+1 lines)
Line 0 Link Here
1
Error 404 Test

Return to bug 62186