Add support for settings wsgi MAX_HEADER_LINE
Changes default from 8192 to 16384 and adds a configuration option. Change-Id: Ia6dc883c60e32e54124fc4d9e5853021c861c284 Closes-Bug: 1453591
This commit is contained in:
@@ -38,4 +38,9 @@ cfg.CONF.register_opts([
|
||||
cfg.BoolOpt('enable-api-v1', default=True),
|
||||
cfg.BoolOpt('enable-api-v2', default=False),
|
||||
cfg.BoolOpt('enable-api-admin', default=False),
|
||||
cfg.IntOpt('max_header_line', default=16384,
|
||||
help="Maximum line size of message headers to be accepted. "
|
||||
"max_header_line may need to be increased when using "
|
||||
"large tokens (typically those generated by the "
|
||||
"Keystone v3 API with big service catalogs)."),
|
||||
], group='service:api')
|
||||
|
||||
@@ -219,6 +219,9 @@ class WSGIService(object):
|
||||
|
||||
def _wsgi_handle(self, application, socket):
|
||||
logger = logging.getLogger('eventlet.wsgi')
|
||||
# Adjust wsgi MAX_HEADER_LINE to accept large tokens.
|
||||
eventlet.wsgi.MAX_HEADER_LINE = self._service_config.max_header_line
|
||||
|
||||
eventlet.wsgi.server(socket,
|
||||
application,
|
||||
custom_pool=self.tg.pool,
|
||||
|
||||
@@ -75,6 +75,11 @@ debug = False
|
||||
# Port the bind the API server to
|
||||
#api_port = 9001
|
||||
|
||||
# Maximum line size of message headers to be accepted. max_header_line may
|
||||
# need to be increased when using large tokens (typically those generated by
|
||||
# the Keystone v3 API with big service catalogs).
|
||||
#max_header_line = 16384
|
||||
|
||||
# Authentication strategy to use - can be either "noauth" or "keystone"
|
||||
#auth_strategy = keystone
|
||||
|
||||
|
||||
Reference in New Issue
Block a user