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

ServerHttpRequest.getSslInfo() always returns null for reactor-netty HTTP/2 requests #25278

Closed
dvoloshyn opened this issue Jun 18, 2020 · 0 comments
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) status: backported An issue that has been backported to maintenance branches type: bug A general bug
Milestone

Comments

@dvoloshyn
Copy link

Affects: 5.2.7.RELEASE


ReactorServerHttpRequest.initSslInfo() works only for HTTP1.1 requests
because the code looks for SslHandler in the channel().pipeline().

For HTTP/2 request SslHandler is locate in the channel().parent().pipeline()
Example how to access: Http2StreamBridgeHandler.channelRead() (reactor-netty)

Or, maybe, you have some other elegant solution?

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Jun 18, 2020
@bclozel bclozel self-assigned this Jun 19, 2020
@bclozel bclozel added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Jun 19, 2020
@bclozel bclozel added this to the 5.1.17 milestone Jun 19, 2020
@bclozel bclozel added the in: web Issues in web modules (web, webmvc, webflux, websocket) label Jun 19, 2020
@bclozel bclozel modified the milestones: 5.1.17, 5.2.8 Jun 19, 2020
@bclozel bclozel added the for: backport-to-5.1.x Marks an issue as a candidate for backport to 5.1.x label Jun 19, 2020
@spring-projects-issues spring-projects-issues added status: backported An issue that has been backported to maintenance branches and removed for: backport-to-5.1.x Marks an issue as a candidate for backport to 5.1.x labels Jun 19, 2020
bclozel added a commit that referenced this issue Jun 19, 2020
Prior to this commit, the `SslInfo` would be missing for WebFlux apps
when deployed on Reactor Netty with http/2.

This commit ensures that the request adapter checks the current channel
and the parent channel for the presence of the `SslHander`.
In the case of http/2, the `SslHander` is tied to the parent channel.

Fixes gh-25286
See gh-25278
FelixFly pushed a commit to FelixFly/spring-framework that referenced this issue Aug 16, 2020
Prior to this commit, the `SslInfo` would be missing for WebFlux apps
when deployed on Reactor Netty with http/2.

This commit ensures that the request adapter checks the current channel
and the parent channel for the presence of the `SslHander`.
In the case of http/2, the `SslHander` is tied to the parent channel.

Fixes spring-projectsgh-25278
zx20110729 pushed a commit to zx20110729/spring-framework that referenced this issue Feb 18, 2022
Prior to this commit, the `SslInfo` would be missing for WebFlux apps
when deployed on Reactor Netty with http/2.

This commit ensures that the request adapter checks the current channel
and the parent channel for the presence of the `SslHander`.
In the case of http/2, the `SslHander` is tied to the parent channel.

Fixes spring-projectsgh-25286
See spring-projectsgh-25278
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) status: backported An issue that has been backported to maintenance branches type: bug A general bug
Projects
None yet
Development

No branches or pull requests

3 participants