-
Notifications
You must be signed in to change notification settings - Fork 563
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 h2c support #694
Fix h2c support #694
Conversation
e1427a2
to
534a193
Compare
Hi @anivanovic , thanks for your contribution! The PR looks good, and fixes the issue: however there is a minor detail, and is that when we move the So, one option I am thinking of is:
But before doing anything, let me check with some mates about this approach. Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@anivanovic , I've double checked with a mate, and we think that in order to be able to merge this PR we would need those minor changes.
Once this is merged, we apply the required changes at the krakend-ce
level to finish the fix, and we can work on doing a new release to have the fixe available for everyone.
Again, thank you very much for your contribution.
812fdac
to
a8402ec
Compare
Sounds good to me. Thanks on taking time reviewing the PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks ! :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the test requires an update to the provided service config , and will be ready to go.
@anivanovic , sorry for bothering, but in order to merge the PR, we also need the commits to be signed: perhaps you will need to amend the commits and add the |
I signed off all commits with |
Hi @anivanovic , |
d17ac3a
to
7936f04
Compare
@taik0 first time doing it so I need some time to set it up. I signed just the last commit. Is this enough? |
You should sign all commits :( Look for |
e00d380
to
9e3366a
Compare
init. If we initialize h2c using gin router it will use h2c handler to wrap handler with all routes registered on gin router. The problem is that it is possible to construct router factory with RunServer function which will wrap h2c handler with additional handler. Any logic in this handler will not be able to understand http2 cleartext requests. We have this example in krakend-ce repository where CORS support is added through RunServer function. Then we have CORS handler -> h2c handler -> Gin router. Simplest fix is to move h2c support to server initialization and add h2c handler as the outermost layer. Signed-off-by: Antonije Ivanovic <[email protected]>
Signed-off-by: Antonije Ivanovic <[email protected]>
Signed-off-by: Antonije Ivanovic <[email protected]>
Signed-off-by: Antonije Ivanovic <[email protected]>
Signed-off-by: Antonije Ivanovic <[email protected]>
9e3366a
to
c9838bd
Compare
@dhontecillas, I just need your reapproval. Everything is signed-off and signed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great!
We will update also the documentation for contributions, so people are aware of the required signing process.
Thank you very much for your contribution.
In my [luraproject#694](luraproject#694) I fixed issued with h2c support and CORS. There was small bug which slipped through code review. New config field does not use correct struct tag. Changed `json` to `mapstructure`.
In my [luraproject#694](luraproject#694) I fixed issued with h2c support and CORS. There was small bug which slipped through code review. New config field does not use correct struct tag. Changed `json` to `mapstructure`. Signed-off-by: Antonije Ivanovic <[email protected]>
This pull request was marked as resolved a long time ago and now has been automatically locked as there has not been any recent activity after it. You can still open a new issue and reference this link. |
About
This solves #786 issue in krakend-ce repo.
Move support for h2c from gin router init to http server
init.
Description
If we initialize h2c using gin router it will use h2c handler
to wrap handler with all routes registered on gin router.
The problem is that it is possible to construct router factory
with RunServer function which will wrap h2c handler with additional
handler. Any logic in this handler will not be able to understand
http2 cleartext requests.
We have this example in krakend-ce repository where CORS support
is added through RunServer function. Then we have CORS handler ->
h2c handler -> Gin router.
Simplest fix is to move h2c support to server initialization
and add h2c handler as the outermost layer.