tomcat roles: add the useBodyEncodingForURI, maxHttpHeaderSize, disableUploadTimeout options to server.xml.

This commit is contained in:
Andrea Dell'Amico 2018-10-24 19:16:04 +02:00
parent 87929ea4d1
commit 3d7387d06c
2 changed files with 23 additions and 8 deletions

View File

@ -56,12 +56,16 @@
{% if item.http_enabled %} {% if item.http_enabled %}
<!-- A http "Connector" using the shared thread pool--> <!-- A http "Connector" using the shared thread pool-->
<Connector executor="tomcatThreadPool" <Connector executor="tomcatThreadPool"
enableLookups="false" enableLookups="false"
maxQueueSize="{{ item.max_queue_size | default(32767) }}" maxQueueSize="{{ item.max_queue_size | default(32767) }}"
maxThreads="{{ item.max_threads }}" connectionTimeout="60000" maxThreads="{{ item.max_threads }}" connectionTimeout="60000"
URIEncoding="UTF-8" bindOnInit="false" address="{{ item.http_address }}" URIEncoding="UTF-8"
bindOnInit="false" address="{{ item.http_address }}"
port="{{ item.http_port }}" protocol="HTTP/1.1" port="{{ item.http_port }}" protocol="HTTP/1.1"
maxPostSize="{{ item.max_post_size | default(104857600) }}" maxPostSize="{{ item.max_post_size | default(104857600) }}"
useBodyEncodingForURI="true"
maxHttpHeaderSize="8192"
disableUploadTimeout="true"
{% if tomcat_m_reverse_proxy_name_enabled %} {% if tomcat_m_reverse_proxy_name_enabled %}
proxyName="{{ tomcat_m_reverse_proxy_name }}" proxyName="{{ tomcat_m_reverse_proxy_name }}"
proxyPort="{{ tomcat_m_reverse_proxy_port }}" proxyPort="{{ tomcat_m_reverse_proxy_port }}"
@ -72,9 +76,12 @@
{% if item.ajp_enabled %} {% if item.ajp_enabled %}
<!-- Define an AJP 1.3 Connector on port {{ tomcat_ajp_port }} --> <!-- Define an AJP 1.3 Connector on port {{ tomcat_ajp_port }} -->
<Connector port="{{ item.ajp_port }}" protocol="AJP/1.3" <Connector port="{{ item.ajp_port }}" protocol="AJP/1.3"
enableLookups="false" enableLookups="false"
address="{{ item.ajp_address }}" address="{{ item.ajp_address }}"
URIEncoding="UTF-8" URIEncoding="UTF-8"
useBodyEncodingForURI="true"
maxHttpHeaderSize="8192"
disableUploadTimeout="true"
maxQueueSize="{{ item.max_queue_size | default(32767) }}" maxQueueSize="{{ item.max_queue_size | default(32767) }}"
maxThreads="{{ item.max_threads }}" maxThreads="{{ item.max_threads }}"
connectionTimeout="60000" connectionTimeout="60000"
@ -83,7 +90,8 @@
proxyName="{{ tomcat_m_reverse_proxy_name }}" proxyName="{{ tomcat_m_reverse_proxy_name }}"
proxyPort="{{ tomcat_m_reverse_proxy_port }}" proxyPort="{{ tomcat_m_reverse_proxy_port }}"
{% endif %} {% endif %}
URIEncoding="UTF-8" bindOnInit="false" /> URIEncoding="UTF-8"
bindOnInit="false" />
{% endif %} {% endif %}
<Engine name="Catalina" defaultHost="localhost"> <Engine name="Catalina" defaultHost="localhost">

View File

@ -79,25 +79,30 @@
{% if tomcat_http_enabled %} {% if tomcat_http_enabled %}
<!-- A http "Connector" using the shared thread pool--> <!-- A http "Connector" using the shared thread pool-->
<Connector executor="tomcatThreadPool" <Connector executor="tomcatThreadPool"
enableLookups="false" enableLookups="false"
maxQueueSize="{{ tomcat_max_queue_size | default(32767) }}" maxQueueSize="{{ tomcat_max_queue_size | default(32767) }}"
maxThreads="{{ tomcat_max_threads }}" connectionTimeout="60000" maxThreads="{{ tomcat_max_threads }}" connectionTimeout="60000"
URIEncoding="UTF-8" bindOnInit="false" address="{{ tomcat_http_address }}" URIEncoding="UTF-8"
useBodyEncodingForURI="true"
bindOnInit="false" address="{{ tomcat_http_address }}"
port="{{ tomcat_http_port }}" protocol="HTTP/1.1" port="{{ tomcat_http_port }}" protocol="HTTP/1.1"
maxPostSize="{{ tomcat_max_post_size | default(104857600) }}" maxPostSize="{{ tomcat_max_post_size | default(104857600) }}"
{% if tomcat_reverse_proxy_name_enabled %} {% if tomcat_reverse_proxy_name_enabled %}
proxyName="{{ tomcat_reverse_proxy_name }}" proxyName="{{ tomcat_reverse_proxy_name }}"
proxyPort="{{ tomcat_reverse_proxy_port }}" proxyPort="{{ tomcat_reverse_proxy_port }}"
{% endif %} {% endif %}
maxHttpHeaderSize="8192"
disableUploadTimeout="true"
/> />
{% endif %} {% endif %}
{% if tomcat_ajp_enabled %} {% if tomcat_ajp_enabled %}
<!-- Define an AJP 1.3 Connector on port {{ tomcat_ajp_port }} --> <!-- Define an AJP 1.3 Connector on port {{ tomcat_ajp_port }} -->
<Connector port="{{ tomcat_ajp_port }}" protocol="AJP/1.3" <Connector port="{{ tomcat_ajp_port }}" protocol="AJP/1.3"
enableLookups="false" address="{{ tomcat_ajp_address }}" enableLookups="false" address="{{ tomcat_ajp_address }}"
maxQueueSize="{{ tomcat_max_queue_size | default(32767) }}" maxQueueSize="{{ tomcat_max_queue_size | default(32767) }}"
URIEncoding="UTF-8" URIEncoding="UTF-8"
useBodyEncodingForURI="true"
maxThreads="{{ tomcat_max_threads }}" maxThreads="{{ tomcat_max_threads }}"
connectionTimeout="60000" connectionTimeout="60000"
maxPostSize="{{ tomcat_max_post_size | default(104857600) }}" maxPostSize="{{ tomcat_max_post_size | default(104857600) }}"
@ -105,7 +110,9 @@
proxyName="{{ tomcat_reverse_proxy_name }}" proxyName="{{ tomcat_reverse_proxy_name }}"
proxyPort="{{ tomcat_reverse_proxy_port }}" proxyPort="{{ tomcat_reverse_proxy_port }}"
{% endif %} {% endif %}
URIEncoding="UTF-8" bindOnInit="false" /> maxHttpHeaderSize="8192"
disableUploadTimeout="true"
bindOnInit="false" />
{% endif %} {% endif %}
<!-- An Engine represents the entry point (within Catalina) that processes <!-- An Engine represents the entry point (within Catalina) that processes