From 6bf1e4d902baf51ca1df7bf78dddf70c57dbef31 Mon Sep 17 00:00:00 2001 From: Ning Sun Date: Fri, 8 Dec 2023 23:44:55 +0800 Subject: [PATCH] feat: jetty 12.0.4 --- http3/project.clj | 2 +- project.clj | 2 +- src/ring/adapter/jetty9/common.clj | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/http3/project.clj b/http3/project.clj index 5a6e8c6..f6f64bf 100644 --- a/http3/project.clj +++ b/http3/project.clj @@ -1,4 +1,4 @@ -(def jetty-version "12.0.3") +(def jetty-version "12.0.4") (defproject info.sunng/ring-jetty9-adapter-http3 "0.4.2" :description "Ring adapter for jetty 9 and above, meta package for http3" diff --git a/project.clj b/project.clj index 4d2fbad..c6397d5 100644 --- a/project.clj +++ b/project.clj @@ -1,4 +1,4 @@ -(def jetty-version "12.0.3") +(def jetty-version "12.0.4") (defproject info.sunng/ring-jetty9-adapter "0.30.3-SNAPSHOT" :description "Ring adapter for jetty9, which supports websocket and spdy" diff --git a/src/ring/adapter/jetty9/common.clj b/src/ring/adapter/jetty9/common.clj index eaf8f58..cfa514c 100644 --- a/src/ring/adapter/jetty9/common.clj +++ b/src/ring/adapter/jetty9/common.clj @@ -3,7 +3,7 @@ (:import [org.eclipse.jetty.http HttpHeader HttpField MimeTypes MimeTypes$Type] [org.eclipse.jetty.server.handler BufferedResponseHandler] [org.eclipse.jetty.server Request Response SecureRequestCustomizer] - [org.eclipse.jetty.io Content$Sink] + [org.eclipse.jetty.io Content$Sink EndPoint$SslSessionData] [org.eclipse.jetty.http ImmutableHttpFields HttpFields$Mutable HttpURI] [java.util Locale])) @@ -50,7 +50,8 @@ (MimeTypes/getCharsetFromContentType content-type)))) (defn- get-client-cert [^Request request] - (.getAttribute request SecureRequestCustomizer/PEER_CERTIFICATES_ATTRIBUTE)) + (when-let [session-data (.getAttribute request EndPoint$SslSessionData/ATTRIBUTE)] + (.peerCertificates ^EndPoint$SslSessionData session-data))) (defn build-request-map "Create the request map from the Request object."