Skip to content

Commit 38b2c69

Browse files
ganisbackyuvipanda
authored andcommitted
address comments
1 parent 5886c4f commit 38b2c69

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

jupyter_server_proxy/handlers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,8 +376,8 @@ async def proxy(self, host, port, proxied_path):
376376
else:
377377
client = httpclient.AsyncHTTPClient()
378378
# check if the request is stream request
379-
proxy_streaming = self.request.headers.get('Accept')
380-
if proxy_streaming == 'text/event-stream':
379+
accept_header = self.request.headers.get('Accept')
380+
if accept_header == 'text/event-stream':
381381
return await self._proxy_progressive(host, port, proxied_path, body, client)
382382
else:
383383
return await self._proxy_buffered(host, port, proxied_path, body, client)

tests/test_proxies.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -371,13 +371,10 @@ def streaming_cb(data):
371371
await client.fetch(
372372
url,
373373
headers={"Accept": "text/event-stream"},
374-
request_timeout=22,
375374
streaming_callback=streaming_cb,
376375
)
377376
assert times_called == limit
378-
print(stream_read_intervals)
379377
assert all([0.45 < t < 3.0 for t in stream_read_intervals])
380-
print(stream_data)
381378
assert stream_data == [b'data: 0\n\n', b'data: 1\n\n', b'data: 2\n\n']
382379

383380

0 commit comments

Comments
 (0)