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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: django content length extraction bug #160

Merged
merged 3 commits into from Jan 27, 2021
Merged

Conversation

daniel-sanche
Copy link
Contributor

@daniel-sanche daniel-sanche commented Jan 25, 2021

We recently added a feature to extract http_request data from Flask and Django environments. Django had a bug where multiple
logs originating from the same request would throw an exception, due to Django no allowing request.body access after an IO operation.

I updated the http_request content length code to use request.META instead of request.body, to match the other fields. I also added a test to make sure this django behaviour doesn't cause issues in the future

Fixes #159 馃

@daniel-sanche daniel-sanche requested review from as code owners Jan 25, 2021
@product-auto-label product-auto-label bot added the api: logging label Jan 25, 2021
@google-cla google-cla bot added the cla: yes label Jan 25, 2021
0xSage
0xSage approved these changes Jan 25, 2021
@daniel-sanche daniel-sanche merged commit 93eeaef into master Jan 27, 2021
8 checks passed
@daniel-sanche daniel-sanche deleted the fix-django-httprequest branch Jan 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: logging cla: yes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants