Skip to content

Commit e29c6b0

Browse files
committed
move quote to get_client_uri
1 parent 3446b55 commit e29c6b0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

jupyter_server_proxy/handlers.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ def get_client_uri(self, protocol, host, port, proxied_path):
139139
client_path = url_path_join(context_path, proxied_path)
140140
else:
141141
client_path = proxied_path
142+
143+
client_path = quote(client_path)
142144

143145
client_uri = '{protocol}://{host}:{port}{path}'.format(
144146
protocol=protocol,
@@ -155,7 +157,7 @@ def _build_proxy_request(self, host, port, proxied_path, body):
155157

156158
headers = self.proxy_request_headers()
157159

158-
client_uri = self.get_client_uri('http', host, port, quote(proxied_path))
160+
client_uri = self.get_client_uri('http', host, port, proxied_path)
159161
# Some applications check X-Forwarded-Context and X-ProxyContextPath
160162
# headers to see if and where they are being proxied from.
161163
if not self.absolute_url:

0 commit comments

Comments
 (0)