Skip to content
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

Multipart forms and RawPostDataException #592

Merged
merged 3 commits into from Oct 12, 2022

Conversation

bazubii
Copy link
Contributor

@bazubii bazubii commented Aug 19, 2022

Multipart forms only allow reading request.body once. In the silk RequestModelFactory, it reads the request.body. This breaks any future reading of request.body in middleware or in views. request.POST or request.FILES will all result in a RawPostDataException. The proposal is to not read request.body for these type of requests since profiling them is still valuable, even without the request body being saved.

…s it, it breaks any other readers including middleware and views. This skips the request body for those forms.
@codecov
Copy link

codecov bot commented Sep 4, 2022

Codecov Report

Merging #592 (eeaeb9c) into master (0e836ed) will increase coverage by 0.03%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #592      +/-   ##
==========================================
+ Coverage   84.60%   84.64%   +0.03%     
==========================================
  Files          52       52              
  Lines        2072     2077       +5     
==========================================
+ Hits         1753     1758       +5     
  Misses        319      319              
Impacted Files Coverage Δ
silk/model_factory.py 83.33% <100.00%> (+0.36%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@albertyw albertyw merged commit b15da76 into jazzband:master Oct 12, 2022
@albertyw albertyw mentioned this pull request Oct 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants