Merged
Conversation
I believe there is a scenario where there is an ETAG and no body that ends up updating the cache with an invalid empty body. This ensures the internal file handle for requests is getting reset approriately. Fixes 263
I'm adding the script here for reference. I don't think the URL or scenario was especially unique, but it did exhibit the behavior and is worth keeping around for reference.
awilkins
reviewed
Oct 31, 2021
| class Serializer(object): | ||
|
|
||
| def dumps(self, request, response, body): | ||
| def dumps(self, request, response, body=None): |
There was a problem hiding this comment.
Don't ned to revert this line, just explicitly pass None from update_cached_response?
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We had a PR a while back that pre-emptively read the body and exhausted the internal file handle. This triggers a rare case where we need to read that file handle again apparently.
The hope is that fixes #263.