ASF Bugzilla – Attachment 35778 Details for
Bug 62186
ErrorDocument causes POST request getting logged as GET request
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Changes to httpd-test suite for easier reproduction
httpd-test_errordoc_method_logging_testcase.patch (text/plain), 2.29 KB, created by
Micha Lenk
on 2018-03-16 15:24:17 UTC
(
hide
)
Description:
Changes to httpd-test suite for easier reproduction
Filename:
MIME Type:
Creator:
Micha Lenk
Created:
2018-03-16 15:24:17 UTC
Size:
2.29 KB
patch
obsolete
>Index: t/apache/errordoc_method_logging.t >=================================================================== >--- t/apache/errordoc_method_logging.t (nonexistent) >+++ t/apache/errordoc_method_logging.t (working copy) >@@ -0,0 +1,34 @@ >+use strict; >+use warnings FATAL => 'all'; >+ >+use Data::Dumper; >+use Apache::Test; >+use Apache::TestRequest; >+use Apache::TestUtil qw/t_cmp >+ t_start_file_watch >+ t_finish_file_watch/; >+ >+Apache::TestRequest::module('error_document'); >+ >+plan tests => 3, need_lwp; >+ >+{ >+ t_start_file_watch 'method_log'; >+ >+ my $response = POST '/method_logging', content => 'does not matter'; >+ chomp(my $content = $response->content); >+ >+ ok t_cmp($response->code, >+ 404, >+ 'POST /method_logging, code'); >+ >+ ok t_cmp($content, >+ 'Error 404 Test', >+ 'POST /method/logging, content'); >+ >+ my @loglines = t_finish_file_watch 'method_log'; >+ chomp @loglines; >+ ok t_cmp($loglines[0], >+ qr/"POST \/method_logging HTTP\/1.1" .* method="POST"/, >+ 'POST /method/logging, log'); >+} >Index: t/conf/extra.conf.in >=================================================================== >--- t/conf/extra.conf.in (revision 1826815) >+++ t/conf/extra.conf.in (working copy) >@@ -742,7 +742,11 @@ > ## > <VirtualHost _default_:error_document> > ErrorDocument 404 "per-server 404 >- >+ <IfModule mod_log_config.c> >+ CustomLog logs/method_log "%h %l %u %t \"%r\" %>s %b method=\"%<m\"" >+ CustomLog logs/access_log "%h %l %u %t \"%r\" %>s %b" >+ </IfModule> >+ > <Location /redefine> > ErrorDocument 404 "per-dir 404 > </Location> >@@ -760,6 +764,10 @@ > ErrorDocument 404 default > </Location> > >+ <Location /method_logging> >+ ErrorDocument 404 /apache/errordoc/404.html >+ </Location> >+ > <Directory @DocumentRoot@/apache> > ErrorDocument 404 "testing merge > </Directory> >Index: t/htdocs/apache/errordoc/404.html >=================================================================== >--- t/htdocs/apache/errordoc/404.html (nonexistent) >+++ t/htdocs/apache/errordoc/404.html (working copy) >@@ -0,0 +1 @@ >+Error 404 Test
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 62186
:
35777
| 35778