URL エンコーディングに問題があります。ブラウザで URL を実行すると、サーバーは何度もエンコードしますが、URL は既に UTF-8 にエンコードされています。
eg. http://test.com:80/?gotoUrl=http%3A%2F%2Fclosewindow.xyz.com&modal=true
I am getting - https://test.com/?gotoUrl=http%253A%252F%252Fclosewindow.xyz.com&modal=true
HTTPS でアプリケーションを実行し、80 のすべての要求を HTTPS セキュア ポート 443 にリダイレクトしています。この問題は、ポート 80 で要求を送信し、サーバーがそれをセキュア ポート 443 にリダイレクトしている場合にのみ発生します。問題は発生しません。
以下は私のTomcat構成です。
<Connector port="8080"
protocol="HTTP/1.1"
connectionTimeout="5000"
compression="on"
compressionMinSize="128"
compressableMimeType="text/html,text/xml,text/plain,text/css,text/javascript,text /json,
application/x-javascript,application/javascript,application/json"
enableLookups="false"
maxPostSize="4096"
URIEncoding="UTF-8"
redirectPort="8443"
/>
<Connector port="8009"
protocol="AJP/1.3"
URIEncoding="UTF-8"
/>
<Connector
protocol="HTTP/1.1"
port="8443" maxThreads="200"
scheme="https" secure="true" SSLEnabled="true"
keystoreFile="/path/keystore" keystorePass="password"
clientAuth="false" sslProtocol="TLS"/>
私の環境は前にApache2.2のようなもので、tomcat7.xはAJP経由でApacheサーバーに接続されています。
この問題を掘り下げたところ、問題は iso-8859-1 を使用している AJP にあることがわかりましたが、Tomcat と Apache は正常に動作し、UTF-8 エンコーディングを使用しています。AJPでエンコーディングをUTF-8に設定する方法はありますか? mod_proxy_ajp を使用しています。
前もって感謝します。これについて何か助けていただければ幸いです。