-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support streaming chunks in HTTP/1.0 read-until-close bodies #3370
base: master
Are you sure you want to change the base?
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.