Skip to content

uvicorn complains when chunked response does not include closing message #373

@RobertoPrevato

Description

@RobertoPrevato

Describe the bug
When a response content is chunked and the last chunk is not empty, currently blacksheep does not send a final message such as:

  await send({
      'type': 'http.response.body',
      'body': b"",
      'more_body': False
  })

Which results in uvicorn complaining, even when the response is transmitted properly to the client, with message:

ERROR:    ASGI callable returned without completing response.

To fix, ensure that a final message with "body": b"" is transmitted to the ASGI server.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions