Skip to content

request.bounded_stream is consumed #3761

Closed
@sauravshanu1

Description

@sauravshanu1

Our firm recently adopted Sentry. We use the default Falcon Integration for request tracing etc.

We are facing trouble while reading the request.bounded_stream data.

In

return self.request.media
,
request.bounded_stream is already consumed before the request comes to request handler.
So, this causes the variable data to be empty. See snippet below.

def on_post(self, request, response):
     data = request.bounded_stream.read()

It is true that the parsed data can be accessed by request.get_media(). However, I would like to access the raw data for purposes like signature verification etc.
Right now, we don't have any option other than disabling Sentry Falcon Integration altogether and writing our own integration to circumvent this problem.

Can Sentry media not consume the media if it is not consumed yet? Or, if it does, reset the bounded_stream with the payload data.

Metadata

Metadata

Type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions