-
-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sending raw body to sentry #760
Sending raw body to sentry #760
Conversation
Raw body: More samples on Sentry. Alternatively, as I said in the Daily (perhaps also of interest for you @m-kuhn since you said you really, really would like to see a full request), a request object could cloned-then-serialized with: import shutil
import copy
cloned_request: wsgi.WSGIRequest = copy.deepcopy(request)
output_stream = io.BytesIO()
shutil.copyfileobj(cloned_request, output_stream) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, two small comments and one idea we communicate in the chat.
Not sure why the changes replaced in 989c7b6 were existing? |
@why-not-try-calmer this seems does not work with real life example outside the test case. At least in my local experiments, I have tried to upload a file and enter the What I have observed is that the middleware and the views are having different Can you please post your steps of testing with real world file upload? Thanks! |
@why-not-try-calmer all works fine, seems it was a misconfiguration from my side. Allowed myself a final change before merging. Thanks for sorting this out! |
Looks ready to merge! (I would approve but I am the PR author so I cannot) |
A few clarifications and observations:
DownloadPushDeleteFileView.post()
does not trigger theparse()
method of its declared parser_class (MultiPartParser), because I did subclass this parser class in a previous version of this PR, and my override ofparse()
never triggered in my testsroom for improvement: ensure that the intendedparse()
function is called, so that we can debug more from that context; this might open the door to reading the request.body only for requests that fail, and not all of them as is the case here.