Upgrade Servlet, JSP and WebSocket API versions
This commit updates the Spring Framework baseline for the Servlet, JSP and WebSocket APIs. This also removes the previously deprecated APIs in JSP `PageContext` and guards against the deprecation of the `PushBuilder` API. See gh-33918
This commit is contained in:
@@ -39,7 +39,6 @@ import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseCookie;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.ReflectionUtils;
|
||||
|
||||
/**
|
||||
* Adapt {@link ServerHttpResponse} to the Servlet {@link HttpServletResponse}.
|
||||
@@ -50,8 +49,6 @@ import org.springframework.util.ReflectionUtils;
|
||||
*/
|
||||
class ServletServerHttpResponse extends AbstractListenerServerHttpResponse {
|
||||
|
||||
private static final boolean IS_SERVLET61 = ReflectionUtils.findField(HttpServletResponse.class, "SC_PERMANENT_REDIRECT") != null;
|
||||
|
||||
private final HttpServletResponse response;
|
||||
|
||||
private final ServletOutputStream outputStream;
|
||||
@@ -186,12 +183,7 @@ class ServletServerHttpResponse extends AbstractListenerServerHttpResponse {
|
||||
cookie.setSecure(httpCookie.isSecure());
|
||||
cookie.setHttpOnly(httpCookie.isHttpOnly());
|
||||
if (httpCookie.isPartitioned()) {
|
||||
if (IS_SERVLET61) {
|
||||
cookie.setAttribute("Partitioned", "");
|
||||
}
|
||||
else {
|
||||
cookie.setAttribute("Partitioned", "true");
|
||||
}
|
||||
cookie.setAttribute("Partitioned", "");
|
||||
}
|
||||
this.response.addCookie(cookie);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user