Support streaming chunks in HTTP/1.0 read-until-close bodies#3370
Support streaming chunks in HTTP/1.0 read-until-close bodies#3370jadehh wants to merge 3 commits intotornadoweb:masterfrom
Conversation
|
What exactly are you trying to do here? This looks the same as the chunking in |
|
{
"Access-Control-Allow-Credentials":true,
"Access-Control-Allow-Headers": "Content-Type",
"Access-Control-Allow-Origin": "*",
"Cache-Control:": "no-cache",
"Connection": "close",
"Content-Type": "video/x-flv",
"Expires": "-1",
"Pragma": "no-cache"
}
so,I created |
|
Without a Content-Length or Transfer-Encoding header, this is an HTTP/1.0-style read-until-close response, so it is handled by Special-casing the |
|
thanks for reply, modify async def _read_body_until_close(self, delegate: httputil.HTTPMessageDelegate) -> None:
while True:
chunk = await self.stream.read_bytes(self.params.chunk_size, partial=True)
if not self._write_finished or self.is_client:
with _ExceptionLoggingContext(app_log):
ret = delegate.data_received(chunk)
if ret is not None:
await ret
|
|
This change looks good, but it needs a test and should be rebased into a single commit with comments in english. |
No description provided.