Skip to content

Commit 5ab8717

Browse files
authored
Merging headers in load_connection_args
1 parent 935d6df commit 5ab8717

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

notebook/gateway/managers.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,13 @@ def load_connection_args(self, **kwargs):
299299
if len(self._static_args) == 0:
300300
self.init_static_args()
301301

302-
kwargs.update(self._static_args)
302+
for arg, static_value in self._static_args.items():
303+
if arg == 'headers':
304+
given_value = kwargs.setdefault(arg, {})
305+
if isinstance(given_value, dict):
306+
given_value.update(static_value)
307+
else:
308+
kwargs[arg] = static_value
303309
return kwargs
304310

305311

0 commit comments

Comments
 (0)