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

Fix stale request object when an explicit serializer type is passed #1103

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zeppelin
Copy link

Fixes #885. (Was likely introduced here)

Although it does solve the issue in the least invasive way, the bug could persist in setups where the serialize() method is overridden, because while the request argument itself is documented, the doc suggests it's fine to throw it away. Also, it doesn't quite fix the underlying issue, namely that serializer & serializer-registry state isn't reset across requests. For example, when serializerRegistry.serializerFor is used to obtain the serializer, the request object must be assigned manually to the serializer, otherwise it'd break the same as before.

Nevertheless, all other solutions would end up being much more complex and have more likelihood of breaking some Mirage setups.

@zeppelin zeppelin force-pushed the fix-885-serializer-stale-request branch from a392b66 to 5cf01ac Compare April 18, 2024 07:44
@zeppelin
Copy link
Author

Ping @IanVS :)

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.

FunctionRouteHandler.serialize() uses stale query params when passed an explicit serializer type
1 participant