Browse Source

Merge pull request #2228 in DESIGN/design from final/10.0 to release/10.0

* commit 'b2fa5c0f739a2f337e521c7333a48eb882d3b4db':
  REPORT-38889 tomcat 8.5.x 请求参数带特殊字符问题
feature/big-screen
superman 4 years ago
parent
commit
b8b4d50c2e
  1. 4
      designer-base/src/main/java/com/fr/start/server/FineEmbedServerActivator.java

4
designer-base/src/main/java/com/fr/start/server/FineEmbedServerActivator.java

@ -62,6 +62,10 @@ public class FineEmbedServerActivator extends Activator {
tomcat.setPort(DesignerEnvManager.getEnvManager().getEmbedServerPort()); tomcat.setPort(DesignerEnvManager.getEnvManager().getEmbedServerPort());
// 设置解码uri使用的字符编码 // 设置解码uri使用的字符编码
tomcat.getConnector().setURIEncoding(EncodeConstants.ENCODING_UTF_8); tomcat.getConnector().setURIEncoding(EncodeConstants.ENCODING_UTF_8);
// 参考 https://jira.atlassian.com/browse/CONFSERVER-57582
// https://tomcat.apache.org/tomcat-8.5-doc/config/http.html
// 8.5.x 请求参数带特殊字符被tomcat拒绝 []|{}^\`"<>
tomcat.getConnector().setProperty("relaxedQueryChars", "[]|{}^&#x5c;&#x60;&quot;&lt;&gt;");
setMaxPostSize(); setMaxPostSize();
String docBase = new File(WorkContext.getCurrent().getPath()).getParent(); String docBase = new File(WorkContext.getCurrent().getPath()).getParent();

Loading…
Cancel
Save