Pre-processing the request body

John ORourke <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <[email protected]>
Hi folks,

I have a mod-perl app on the receiving end of a POST from a credit card
company, and they are sending the data as application/x-www-form-urlencoded
but they aren't URL-encoding UTF-8 characters.  When I give that malformed
data to Apache2::Request it refuses to see any POST variables atall.

This company generally don't understand charset/header issues, so instead of
going through some pain, I'd like to re-write the request body and the
Content-Length header.

What is the most modperl-like way to do that?

I'm guessing the sort of filter described here
http://perl.apache.org/docs/2.0/user/handlers/filters.html#All_in_One_Filtermight
be best, but has anyone made a wrapper that allows, for example, regex
search+replace on the request body and header-rewriting?

thanks
John
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.