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

Forward context in fasthttpadaptor #720

Merged
merged 2 commits into from
Jan 10, 2020
Merged

Forward context in fasthttpadaptor #720

merged 2 commits into from
Jan 10, 2020

Conversation

lovromazgon
Copy link
Contributor

Right now the request in fasthttpadaptor has a background context. It would be beneficial to set it to fasthttp.RequestCtx or at least forward values that are already set in the context. This would allow us to retrieve any value that was set in middleware before the request reached the http.Handler.

go.mod Outdated
@@ -1,4 +1,4 @@
module github.com/valyala/fasthttp
module github.com/lovromazgon/fasthttp
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We obviously can't merge this pull request with this change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, removed it!

ctx.SetUserValue(key, value)
next(ctx)
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please go fmt this file.

@erikdubbelboer erikdubbelboer merged commit 8d8443d into valyala:master Jan 10, 2020
@erikdubbelboer
Copy link
Collaborator

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants