File tree Expand file tree Collapse file tree 3 files changed +4
-3
lines changed
Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -668,7 +668,7 @@ async def extract_request_info(self):
668668 and "sentry_sdk.is_body_cached" in self .request .scope ["state" ]
669669 and self .request .scope ["state" ]["sentry_sdk.is_body_cached" ]
670670 )
671- if await self . request . is_disconnected () and not is_body_cached :
671+ if not is_body_cached :
672672 request_info ["data" ] = (
673673 AnnotatedValue .removed_because_body_consumed_and_not_cached ()
674674 )
Original file line number Diff line number Diff line change 1+ import asyncio
12import json
23import logging
34import pytest
@@ -86,7 +87,7 @@ async def _consume_stream_body(request):
8687 # Avoid cache by constructing new request
8788 wrapped_request = Request (request .scope , request .receive )
8889
89- assert await wrapped_request .json () == BODY_JSON
90+ assert await asyncio . wait_for ( wrapped_request .json (), timeout = 1.0 ) == BODY_JSON
9091
9192 return {"status" : "ok" }
9293
Original file line number Diff line number Diff line change @@ -518,7 +518,7 @@ async def _consume_stream_body(request):
518518 # Avoid cache by constructing new request
519519 wrapped_request = Request (request .scope , request .receive )
520520
521- assert await wrapped_request .json () == BODY_JSON
521+ assert await asyncio . wait_for ( wrapped_request .json (), timeout = 1.0 ) == BODY_JSON
522522
523523 return starlette .responses .JSONResponse ({"status" : "ok" })
524524
You can’t perform that action at this time.
0 commit comments