I'm trying to debug a problem to a web application that I didn't write and that I cannot alter, that seems to have serious encoding problems whenever it receives requests not in UTF8.
Now, to prove that this in fact is the problem (and to mitigate it while the actual web application is fixed) I was thinking about putting some kind of reverse proxy in front of it to work around the issue.
Its only work would be to receive requests, check if the Content Type is textual but not UTF8; in this case, it would have to re-encode the whole request body in UTF8, alter the Content Type and forward it upstream. In all other cases, leave everything intact. I don't even think that altering the reply would be necessary.
Now, is this possible to do with some of the usual reverse proxies running on Linux (Apache, Nginx, Varnish, ...), or I have to write my own filter?