Apache2 RequestHeader读取的值是ISO-8859-1而不是UTF-8

这是一个特殊情况,我在我的tomcat前面使用Apache mod_proxy ,并且Apache也使用mod_header添加了带有mod_headers的 RequestHeader。 如果特殊字符在URI中,则它们被读取为ISO-8859-1 。 即使我在规则中写下了一个特殊的价值,比如“hélo”。 如果我的conf文件保存为ISO-8859-1 ,那么确定,但是如果conf文件保存为UTF-8 ,那么它就是KO(在运行时变成)。 我没有find这个编码configuration。 我尝试在Windows和Linux的Apache服务器上。 这里的configuration文件:

<VirtualHost *:80> ServerName apache.convertigo.net ProxyPass / http://httpbin.org/anything/ ProxyPassReverse / http://httpbin.org/anything/ RewriteEngine On RewriteRule ^(.*)$ - [E=X_REQUEST_URI:%{REQUEST_URI},E=X_REQUEST_HOST:%{HTTP_HOST},E=X_HTTPS_STATE:%{HTTPS}] RequestHeader set x-request-uri "%{X_REQUEST_URI}e" env=X_REQUEST_URI RequestHeader set x-request-host "%{X_REQUEST_HOST}e" env=X_REQUEST_HOST RequestHeader set x-https-state "%{X_HTTPS_STATE}e" env=X_HTTPS_STATE RequestHeader set x-frontal "apache" RequestHeader set x-helo "hélo" </VirtualHost> 

这里是一个testingURL,它回显URI(请参阅X-Request-Uri ): http : //apache.convertigo.net/hélo

结果是:

 { "args": {}, "data": "", "files": {}, "form": {}, "headers": { "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "Accept-Encoding": "gzip, deflate", "Accept-Language": "fr-FR,en-US;q=0.8,fr;q=0.6,en;q=0.4", "Cache-Control": "max-age=0", "Connection": "close", "Dnt": "1", "Host": "httpbin.org", "Upgrade-Insecure-Requests": "1", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36", "X-Forwarded-Host": "apache.convertigo.net", "X-Forwarded-Server": "apache.convertigo.net", "X-Frontal": "apache", "X-Helo": "h\u00c3\u00a9lo", "X-Https-State": "off", "X-Request-Host": "apache.convertigo.net", "X-Request-Uri": "/h\u00c3\u00a9lo" }, "json": null, "method": "GET", "origin": "217.167.129.14, 54.171.110.0", "url": "http://apache.convertigo.net/anything/h\u00e9lo" } 

我期望X-Request-Uri“/ hOOe9lo” (如url )而不是“/ h \ u00c3 \ u00a9lo”