CONFSERVER-59318: Allow setting maxHttpHeaderSize

This commit is contained in:
Dave Chevell 2020-03-18 18:06:22 +11:00
parent f99edfada3
commit 195cd45189
No known key found for this signature in database
GPG Key ID: 279DF1B52C7C44DC
3 changed files with 7 additions and 3 deletions

View File

@ -129,6 +129,7 @@ see https://tomcat.apache.org/tomcat-7.0-doc/config/index.html.
* `ATL_TOMCAT_ENABLELOOKUPS` (default: false)
* `ATL_TOMCAT_PROTOCOL` (default: HTTP/1.1)
* `ATL_TOMCAT_ACCEPTCOUNT` (default: 10)
* `ATL_TOMCAT_MAXHTTPHEADERSIZE` (default: 8192)
## JVM configuration

View File

@ -28,7 +28,7 @@
relaxedPathChars="[]|"
relaxedQueryChars="[]|{}^\`"<>"
bindOnInit="false"
maxHttpHeaderSize="8192"
maxHttpHeaderSize="{{ atl_tomcat_maxhttpheadersize | default('8192') }}"
useBodyEncodingForURI="true"
disableUploadTimeout="true" />

View File

@ -62,6 +62,7 @@ def test_server_xml_defaults(docker_cli, image):
assert connector.get('scheme') == 'http'
assert connector.get('proxyName') == ''
assert connector.get('proxyPort') == ''
assert connector.get('maxHttpHeaderSize') == '8192'
def test_server_xml_catalina_fallback(docker_cli, image):
environment = {
@ -99,6 +100,7 @@ def test_server_xml_params(docker_cli, image):
'ATL_TOMCAT_SCHEME': 'https',
'ATL_PROXY_NAME': 'conf.atlassian.com',
'ATL_PROXY_PORT': '443',
'ATL_TOMCAT_MAXHTTPHEADERSIZE': '8193',
'ATL_TOMCAT_CONTEXTPATH': '/myconf',
}
container = run_image(docker_cli, image, environment=environment)
@ -121,6 +123,7 @@ def test_server_xml_params(docker_cli, image):
assert connector.get('scheme') == environment.get('ATL_TOMCAT_SCHEME')
assert connector.get('proxyName') == environment.get('ATL_PROXY_NAME')
assert connector.get('proxyPort') == environment.get('ATL_PROXY_PORT')
assert connector.get('maxHttpHeaderSize') == environment.get('ATL_TOMCAT_MAXHTTPHEADERSIZE')
assert context.get('path') == environment.get('ATL_TOMCAT_CONTEXTPATH')