Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: mod_ext_filter error |
|
Author |
|
stparker
Joined: 05 Jan 2007 Posts: 1 Location: Wisconsin, United States
|
Posted: Sun 10 Nov '19 1:31 Post subject: mod_ext_filter error |
|
|
Dear Apache Lounge experts,
I have a custom input filter that I implemented using mod_ext_filter. It has been working well on server version 2.4.35 but is broken on 2.4.41. I am using the same http.conf file and nothing has changed in the server environment. I have not tested on the intervening versions.
I tested further using the "trace" filter example from the Apache Server 2.4.41 documentation with the same result.
Here is the snippet from the http.conf file:
ExtFilterDefine trace-filter mode=input \
cmd="C:/Perl64/bin/perl.exe C:/Apache24/conf/filters/trace_filter.pl"
<Location /trace>
ExtFilterOptions LogStderr
SetInputFilter trace-filter
</Location>
Here is the filter:
#!c:\perl64\bin\perl.exe
#
# Simple trace filter from Apache 2.4 mod_ext_filter documentation.
####################################################################
use strict;
open(SAVED, '>d:/trace.txt')
or die "Can't open trace.txt: $?";
while (<STDIN>) {
print SAVED $_;
print $_;
}
close (SAVED);
It works fine on 2.4.35. But on 2.4.41 the server returns a Bad Request error with the following in the error log:
[ext_filter:error] [pid xxxxx:tid xxxxx] (22)Invalid argument: [client xxx.xxx.xxx.xxx:xxxxx] AH01465: apr_file_pipe_timeout_set(child output)
I am thinking that 2.4.41 must be less forgiving about an issue in my configuration, but I'm stumped how to fix it.
Would anyone have any suggestions?
Thanks,
Steven |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Tue 12 Nov '19 7:45 Post subject: |
|
|
No it looks like you squeezed a bug up to the surface. It looks to be in APR 1.7.0 because I at least see the perl script run and it creates a text file when using a 2.4.41 compiled with APR 1.6.5 like I did when I tried it with 2.4.35. |
|
Back to top |
|
dimitry_unified
Joined: 30 Sep 2020 Posts: 3 Location: Netherlands
|
Posted: Wed 30 Sep '20 18:42 Post subject: |
|
|
I found an Apache bug report for this issue, which was posted 2019-06-08: https://bz.apache.org/bugzilla/show_bug.cgi?id=63491
After some research it turns out that this was because the apr folks didn't merge a fix from trunk (r1809753 into the apr 1.7.x branch.
Pretty quickly, Nick Kew has merged it into 1.7.x in r1882155. So at some point this will hopefully end up in apr 1.7.1, when it is released.
I hope the Apache Lounge maintainers can include this one-liner into a new binary build of Apache 2.4.46, then external filters should start working again. |
|
Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3094 Location: Hilversum, NL, EU
|
Posted: Wed 30 Sep '20 19:02 Post subject: |
|
|
What version you need to test.
A guess: VS16 Win64.
Coming days I apply the Patch to separate build, so you can test.
Steffen |
|
Back to top |
|
dimitry_unified
Joined: 30 Sep 2020 Posts: 3 Location: Netherlands
|
Posted: Wed 30 Sep '20 19:09 Post subject: |
|
|
Quote: | What version you need to test.
A guess: VS16 Win64. |
We originally used the VC15 ones, since we compile Apache modules against it with Visual Studio 2017.
(E.g. I started with httpd-2.4.39-win64-VC15.zip and httpd-2.4.46-win64-VC15.zip which didn't work, but I had an old httpd-2.4.37-win64-VC15.zip file lying around which worked.)
But a VS16 build would also be fine, at least for testing. If it works, I'll close the upstream Apache bug. |
|
Back to top |
|
admin Site Admin
Joined: 15 Oct 2005 Posts: 692
|
Posted: Thu 01 Oct '20 10:59 Post subject: |
|
|
Here you go.
Applied :
revision 1882155 by niq, Wed Sep 30 13:54:18 2020 UTC:
Code: | --- apr/apr/branches/1.7.x/file_io/win32/pipe.c 2017/05/23 16:25:31 1795930
+++ apr/apr/branches/1.7.x/file_io/win32/pipe.c 2020/09/30 13:54:18 1882155
@@ -76,7 +76,7 @@ APR_DECLARE(apr_status_t) apr_file_pipe_
apr_int32_t blocking,
apr_pool_t *p)
{
- return apr_file_pipe_create_pools(in, out, APR_FULL_BLOCK, p, p);
+ return apr_file_pipe_create_pools(in, out, blocking, p, p);
}
APR_DECLARE(apr_status_t) apr_file_pipe_create_pools(apr_file_t **in,{ |
Last edited by admin on Fri 02 Oct '20 12:43; edited 1 time in total |
|
Back to top |
|
dimitry_unified
Joined: 30 Sep 2020 Posts: 3 Location: Netherlands
|
Posted: Thu 01 Oct '20 14:34 Post subject: |
|
|
Thank you, external filtering works fine now, with this build! |
|
Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3094 Location: Hilversum, NL, EU
|
Posted: Sat 03 Oct '20 13:42 Post subject: |
|
|
New builds with the fix are available now.
Thanks! appreciate it.
Steffen |
|
Back to top |
|
|
|
|
|
|