Python: fixing ASGI receive() issues.

The receive() call never blocks for a GET request and always returns the same
empty body message.  The Starlette framework creates a separate task when
receive() is called in a loop until an 'http.disconnect' message is received.

The 'http.disconnect' message was previously issued after the response header
had been sent.  However, the correct behavior is to respond with
'http.disconnect' after sending the response is complete.

This closes #564 issue on GitHub.
This commit is contained in:
Max Romanov
2021-07-20 10:37:50 +03:00
parent daa051e7e7
commit 567545213d
2 changed files with 61 additions and 33 deletions

View File

@@ -65,6 +65,13 @@ a full-form IPv6 in a listener address.
</para>
</change>
<change type="bugfix">
<para>
compatibility issues with some Python ASGI apps, notably based on Starlette
framework.
</para>
</change>
</changes>