
Ich habe einen Reverse-Proxy mit mod_proxy, mod_proxy_html (3.1.3) und mod_xml2enc auf einer CentOS 6.4-Box eingerichtet.
Der Proxy stellt den Zielserver einwandfrei bereit, verstümmelt jedoch Nicht-ASCII-Zeichen (in meinem Fall „äöüéàè“).
Ich habe überall gegoogelt, um eine Lösung dafür zu finden, aber ohne Erfolg.
Die Kodierung ist im Antwortheader korrekt angegeben und identisch mit der des Zielservers (utf-8). Ich habe auch versucht, die von xml2enc verwendete Kodierung explizit festzulegen über:
xml2EncDefault utf-8
aber ohne Wirkung.
Ich führe den Proxy über einen virtuellen Host aus, wobei die Proxy-Konfiguration wie folgt eingestellt ist:
ProxyRequests off
ProxyHTMLLinks a href
ProxyHTMLLinks area href
ProxyHTMLLinks link href
ProxyHTMLLinks img src longdesc usemap
ProxyHTMLLinks object classid codebase data usemap
ProxyHTMLLinks q cite
ProxyHTMLLinks blockquote cite
ProxyHTMLLinks ins cite
ProxyHTMLLinks del cite
ProxyHTMLLinks form action
ProxyHTMLLinks input src usemap
ProxyHTMLLinks head profile
ProxyHTMLLinks base href
ProxyHTMLLinks script src for
ProxyHTMLLinks iframe src
ProxyPass /foo/ http://someserver.com/
ProxyPassReverse /foo/ http://www.someserver.com/
<Location /foo/>
SetOutputFilter INFLATE;proxy-html;DEFLATE
ProxyPassReverse /
ProxyPassReverseCookiePath / /foo
ProxyHTMLURLMap http://www.someserver.com /foo
ProxyHTMLURLMap http://someserver.com /foo
RequestHeader unset Accept-Encoding
</Location>
Antwort1
Es stellte sich heraus, dass „mod_proxy_html“ an all dem unschuldig war.
Angabe der Kodierung über:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
hat das Problem behoben.
Das ist etwas seltsam, da der „Content-Type“ im Antwortheader richtig festgelegt wurde.