-
Notifications
You must be signed in to change notification settings - Fork 476
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
Reusing provided HTTP context in UnroutedHandler #443
Comments
Sorry I missed the attempts already made. I've read the solution you propose in the comments in PR #315. I will try to propose something in this way. |
I have just seen that this that this PR #342 seems to be doing the job.
It is this missing test that is blocking its approval? |
Yes, this PR is just missing a proper test. However, I would also like to try reusing the request context in such a way that the data storages still work. But that may require some internal refactoring. This would definitely be a better approach instead of such a work around, if you understand what I mean. |
Is your feature request related to a problem? Please describe.
We use tusd with our own store to use the SSE-C functionality of the S3 standard and manage encryption. In order to manage our encryption keys, we have middleware that does a lot of business verification and we would like to pass information through the HTTP context.
But in the UnroutedHandler, the handler methods create a new context (ctx.Background()) and do not reuse the HTTP request context provided (r.Context()).
By example,
Describe the solution you'd like
The Http request context could be used: this would allow middleware to add their own information. I don't believe there is any reason not to use it, but I may have missed something.
Using the same example, it would be :
Describe alternatives you've considered
Using wide available Hashmap, or something like that… but it's not very nice :(
Can you provide help with implementing this feature?
Yep, I think we can manage this little change :)
The text was updated successfully, but these errors were encountered: