How to Get Unicode 'non-ASCII' Characters in HTTPS URL to Appear Correctly

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

症状

In most cases URLs running over HTTP work fine, but not when using HTTPS (i.e. over SSL). This usually results in Unicode (non-ASCII) characters in an HTTPS URL appearing incorrect in the URL, and the served page containing numerous errors.

原因

This occurs when the useBodyEncodingForURI="true" flag is not defined in the HTTPS connector definition in conf/server.xml of the Apache Tomcat application server running JIRA. This flag is set as such by default in 'recommended' distribution installations of JIRA, however, in JIRA WAR setups, this might not be the case.

ソリューション

  • Ensure that the useBodyEncodingForURI="true" flag is included in the following element of the conf/server.xml file of your Apache Tomcat installation running JIRA. This forces the encoding to match the encoding of the request, which should be in UTF-8:

    <Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol"
      maxHttpHeaderSize="8192" SSLEnabled="true"
      maxThreads="150" minSpareThreads="25"
      enableLookups="false" disableUploadTimeout="true"
      acceptCount="100" scheme="https" secure="true"
      clientAuth="false" sslProtocol="TLS" useBodyEncodingForURI="true"/>
  • Alternatively you can set the flag URIEncoding="UTF-8", which will set the default URL encoding to UTF-8:

    <Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol"
      maxHttpHeaderSize="8192" SSLEnabled="true"
      maxThreads="150" minSpareThreads="25"
      enableLookups="false" disableUploadTimeout="true"
      acceptCount="100" scheme="https" secure="true"
      clientAuth="false" sslProtocol="TLS" URIEncoding="UTF-8"/>

     

 

 

最終更新日: 2016 年 2 月 26 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.