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

extensions: introduce another data structure that support "appending" instead of "replacing" #1518

Open
niklasad1 opened this issue Jan 15, 2025 · 0 comments

Comments

@niklasad1
Copy link
Member

jsonrpsee relies on http::Extensions both for http middleware and rpc middleware which works based on Rust type ids so if one injects Vec<String> in the extensions for instance in a batch request with several calls the last item "wins" and simply replaces it.

This is not ideal and would be much better to use some other internal data structure to merge such data

There is another crate https://docs.rs/polymap/latest/polymap/polymap/struct.PolyMap.html that may be useful for this

For further context see #1509 and #1514

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

No branches or pull requests

1 participant