Apache Server configuration support - Apache Windows ExtFilterDefine / Output / SED

This is Interesting: Free IT Magazines  
Home > Archive > Apache Server configuration support > November 2007 > Apache Windows ExtFilterDefine / Output / SED





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Apache Windows ExtFilterDefine / Output / SED
M. Agel

2007-11-10, 1:23 pm

Hi,

a couple of question concerning Apache Windows (tried 2.0 and 2.2) using the mod_ext_filter.

- Apache runs as a Reverse Proxy and I need to rewrite a received HTML document.
- On Linux I am using sed and a simple Regex to "clean up" the HTML code. Works fine.

On an Apache Windows (running on W2K3) i tried the same, trying several Win32 Builds of SED.
The call (on win) is something similiar like this:

ExtFilterDefine cleanup mode=output intype=text/html cmd="c:/sed.exe s/search/replace/g"
SetOutputFilter cleanup

What happens is that either sed (and apache) hangs or nothing at all, depeding on the version of sed. The regex is fine, it works on
the command prompt. However Apache+Sed on windows seem not to work well together.

My question:

- Anybody of you successfully modified output html code using ExtDefineFilter (or something similiar) on a Windows machine? What
tool you were using?


Tnx a lot! I am really stuck on that topic...

Mike

HansH

2007-11-10, 7:26 pm

"M. Agel" <mike@eldea.de> schreef in bericht
news:5pmcimFr5rudU1@mid.individual.net...
> a couple of question concerning Apache Windows (tried 2.0 and 2.2) using
> the mod_ext_filter.
> - Apache runs as a Reverse Proxy and I need to rewrite a received HTML
> document.
> - On Linux I am using sed and a simple Regex to "clean up" the HTML code.
> Works fine.
>
> On an Apache Windows (running on W2K3) i tried the same, trying several
> Win32 Builds of SED.
> The call (on win) is something similiar like this:
>
> ExtFilterDefine cleanup mode=output intype=text/html cmd="c:/sed.exe
> s/search/replace/g"
> SetOutputFilter cleanup
>
> What happens is that either sed (and apache) hangs or nothing at all,
> depeding on the version of sed. The regex is fine, it works on the command
> prompt. However Apache+Sed on windows seem not to work well together.
>

Taking your word against sed, try "perl -pe ' s{s}{q}g;'" or "perl -pe
'$|=1; s{s}{q}g;'"

HansH


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com