Skip to content

Commit

Permalink
Merge pull request #10 from hugiron/fix/on_receive_readchunk
Browse files Browse the repository at this point in the history
Fix readchunk call for large body without chunked encoding
  • Loading branch information
mosquito authored Mar 20, 2023
2 parents 51cd38f + c79b084 commit 8d384df
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:
- run: poetry run coveralls
env:
COVERALLS_PARALLEL: 'true'
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
COVERALLS_SERVICE_NAME: github
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

finish:
Expand Down
4 changes: 2 additions & 2 deletions aiohttp_asgi/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,11 @@ async def on_receive(self) -> Dict[str, Any]:
"code": response.close_code,
}

chunk, more_body = await self.request.content.readchunk()
chunk, _ = await self.request.content.readchunk()
return {
"type": "http.request",
"body": chunk,
"more_body": more_body,
"more_body": not self.request.content.at_eof(),
}

async def on_send(self, payload: Dict[str, Any]) -> None:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "aiohttp_asgi"
version = "0.5.0"
version = "0.5.2"
description = "Adapter to running ASGI applications on aiohttp"
authors = ["Dmitry Orlov <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit 8d384df

Please sign in to comment.