Skip to content

Commit 23e3288

Browse files
authored
Merge branch 'main' into centralize-cleanup
2 parents fe929f9 + 593dbe7 commit 23e3288

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

docs/autogen_config.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
try:
3939
destination = os.path.join(os.path.dirname(__file__), "source/other/full-config.rst")
4040
except BaseException:
41-
destination = os.path.join(os.getcwd(), "full-config.rst")
41+
destination = os.path.join(os.getcwd(), "other/full-config.rst")
4242

4343
with open(destination, "w") as f:
4444
f.write(header)

jupyter_server/serverapp.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ def shutdown_server(server_info, timeout=5, log=None):
493493
if log:
494494
log.debug("POST request to %sapi/shutdown", url)
495495

496-
fetch(url, method="POST", headers={"Authorization": "token " + server_info["token"]})
496+
fetch(url, method="POST", body=b"", headers={"Authorization": "token " + server_info["token"]})
497497
# Poll to see if it shut down.
498498
for _ in range(timeout * 10):
499499
if not check_pid(pid):

jupyter_server/utils.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,9 @@ def fetch(urlstring, method="GET", body=None, headers=None):
346346
Send a HTTP, HTTPS, or HTTP+UNIX request
347347
to a Tornado Web Server. Returns a tornado HTTPResponse.
348348
"""
349-
with _request_for_tornado_client(urlstring) as request:
349+
with _request_for_tornado_client(
350+
urlstring, method=method, body=body, headers=headers
351+
) as request:
350352
response = HTTPClient(AsyncHTTPClient).fetch(request)
351353
return response
352354

@@ -356,7 +358,9 @@ async def async_fetch(urlstring, method="GET", body=None, headers=None, io_loop=
356358
Send an asynchronous HTTP, HTTPS, or HTTP+UNIX request
357359
to a Tornado Web Server. Returns a tornado HTTPResponse.
358360
"""
359-
with _request_for_tornado_client(urlstring) as request:
361+
with _request_for_tornado_client(
362+
urlstring, method=method, body=body, headers=headers
363+
) as request:
360364
response = await AsyncHTTPClient(io_loop).fetch(request)
361365
return response
362366

0 commit comments

Comments
 (0)