httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Andersson" <rob...@profundis.nu>
Subject Re: [users@httpd] Getting filters to work
Date Mon, 18 Aug 2003 15:28:16 GMT
Cody Harris wrote:
> I have a simple perl program that writes to a file on my drive, but it
> doesn't execute. (And yes, i HAVE been restarting apache).

I had to try myself, and after some messing I got it to work (on Windows!).

    ExtFilterDefine manfilter_xyz \
        cmd="e:/usr/bin/perl.exe e:/xyz.pl" \
        mode=output \
        intype=text/html \
        ftype=10
        # 10 = AP_FTYPE_RESOURCE

    <Directory "e:/usr/local/Apache2/manual">
        SetOutputFilter manfilter_xyz
        ...
    </Directory>

And the little Perl script:

    #!/usr/bin/perl
    use strict;

    while(<>) {
        print /^(.*?)(apache)(.*)$/i ? $1.uc($2).' !!!'.$3 : $_;
    }

Works fine for me. I have some problems getting it to work on directory
indexes, however. I seem to only get a few headers (including URI: ???).

Regards,
Robert Andersson


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message