Merge branch '5.2.x'

This commit is contained in:
Brian Clozel 2020-06-19 16:45:35 +02:00
commit e0e1c12402
1 changed files with 6 additions and 1 deletions

View File

@ -23,6 +23,7 @@ import java.util.concurrent.atomic.AtomicLong;
import javax.net.ssl.SSLSession;
import io.netty.channel.Channel;
import io.netty.handler.codec.http.HttpHeaderNames;
import io.netty.handler.codec.http.cookie.Cookie;
import io.netty.handler.ssl.SslHandler;
@ -160,7 +161,11 @@ class ReactorServerHttpRequest extends AbstractServerHttpRequest {
@Override
@Nullable
protected SslInfo initSslInfo() {
SslHandler sslHandler = ((Connection) this.request).channel().pipeline().get(SslHandler.class);
Channel channel = ((Connection) this.request).channel();
SslHandler sslHandler = channel.pipeline().get(SslHandler.class);
if (sslHandler == null && channel.parent() != null) { // HTTP/2
sslHandler = channel.parent().pipeline().get(SslHandler.class);
}
if (sslHandler != null) {
SSLSession session = sslHandler.engine().getSession();
return new DefaultSslInfo(session);