@@ -767,8 +767,8 @@ def _token_default(self):
767
767
768
768
max_body_size = Integer (512 * 1024 * 1024 , config = True ,
769
769
help = """
770
- Sets the maximum allowed size of the client request body, specified in
771
- the Content-Length request header field. If the size in a request
770
+ Sets the maximum allowed size of the client request body, specified in
771
+ the Content-Length request header field. If the size in a request
772
772
exceeds the configured value, a malformed HTTP message is returned to
773
773
the client.
774
774
@@ -778,7 +778,7 @@ def _token_default(self):
778
778
779
779
max_buffer_size = Integer (512 * 1024 * 1024 , config = True ,
780
780
help = """
781
- Gets or sets the maximum amount of memory, in bytes, that is allocated
781
+ Gets or sets the maximum amount of memory, in bytes, that is allocated
782
782
for use by the buffer manager.
783
783
"""
784
784
)
@@ -1313,7 +1313,8 @@ def init_webapp(self):
1313
1313
self .ssl_options ['keyfile' ] = self .keyfile
1314
1314
if self .client_ca :
1315
1315
self .ssl_options ['ca_certs' ] = self .client_ca
1316
- if len (self .ssl_options ) == 0 :
1316
+ if not self .ssl_options :
1317
+ # could be an empty dict or None
1317
1318
# None indicates no SSL config
1318
1319
self .ssl_options = None
1319
1320
else :
@@ -1353,7 +1354,7 @@ def display_url(self):
1353
1354
self .get_url (ip = ip , path = path , token = token )
1354
1355
+ '\n or '
1355
1356
+ self .get_url (ip = '127.0.0.1' , path = path , token = token )
1356
- )
1357
+ )
1357
1358
return url
1358
1359
1359
1360
@property
@@ -1466,7 +1467,7 @@ def init_server_extension_config(self):
1466
1467
"""Consolidate server extensions specified by all configs.
1467
1468
1468
1469
The resulting list is stored on self.jpserver_extensions and updates config object.
1469
-
1470
+
1470
1471
The extension API is experimental, and may change in future releases.
1471
1472
"""
1472
1473
# Load server extensions with ConfigManager.
@@ -1491,7 +1492,7 @@ def init_server_extensions(self):
1491
1492
1492
1493
Import the module, then call the load_jupyter_server_extension function,
1493
1494
if one exists.
1494
-
1495
+
1495
1496
The extension API is experimental, and may change in future releases.
1496
1497
"""
1497
1498
# Initialize extensions
@@ -1570,16 +1571,16 @@ def http_server(self):
1570
1571
1571
1572
def init_httpserver (self ):
1572
1573
"""Creates an instance of a Tornado HTTPServer for the Server Web Application
1573
- and sets the http_server attribute.
1574
+ and sets the http_server attribute.
1574
1575
"""
1575
1576
# Check that a web_app has been initialized before starting a server.
1576
1577
if not hasattr (self , 'web_app' ):
1577
1578
raise AttributeError ('A tornado web application has not be initialized. '
1578
1579
'Try calling `.init_webapp()` first.' )
1579
-
1580
+
1580
1581
# Create an instance of the server.
1581
1582
self ._http_server = httpserver .HTTPServer (
1582
- self .web_app ,
1583
+ self .web_app ,
1583
1584
ssl_options = self .ssl_options ,
1584
1585
xheaders = self .trust_xheaders ,
1585
1586
max_body_size = self .max_body_size ,
@@ -1643,11 +1644,11 @@ def initialize(self, argv=None, load_extensions=True, new_httpserver=True):
1643
1644
----------
1644
1645
argv: list or None
1645
1646
CLI arguments to parse.
1646
-
1647
+
1647
1648
load_extensions: bool
1648
1649
If True, the server will load server extensions listed in the jpserver_extension trait.
1649
1650
Otherwise, no server extensions will be loaded.
1650
-
1651
+
1651
1652
new_httpserver: bool
1652
1653
If True, a tornado HTTPServer instance will be created and configured for the Server Web
1653
1654
Application. This will set the http_server attribute of this class.
0 commit comments