"the server securely"),
]
+eventlet_opts = [
+ 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)."),
+]
+
CONF = cfg.CONF
CONF.register_opts(socket_opts)
+CONF.register_opts(eventlet_opts)
LOG = logging.getLogger(__name__)
-# Raise the default from 8192 to accommodate large tokens
-eventlet.wsgi.MAX_HEADER_LINE = 16384
-
class Server(object):
"""Server class to manage a WSGI server, serving a WSGI application."""
:returns: None
"""
+ # Allow operators to customize http requests max header line size.
+ eventlet.wsgi.MAX_HEADER_LINE = CONF.max_header_line
self.name = name
self.app = app
self._host = host or "0.0.0.0"
# Options defined in cinder.wsgi
#
+# 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). (integer value)
+#max_header_line=16384
+
# Sets the value of TCP_KEEPIDLE in seconds for each server
# socket. Not supported on OS X. (integer value)
#tcp_keepidle=600