From c20a7237495fe12ca85d9b3f6221254e4a7d85aa Mon Sep 17 00:00:00 2001 From: Jan Bartel Date: Wed, 1 May 2024 17:48:30 +1000 Subject: [PATCH] See https://github.com/jakartaee/servlet/issues/616 --- .../org/eclipse/jetty/ee11/servlet/ServletApiResponse.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/jetty-ee11/jetty-ee11-servlet/src/main/java/org/eclipse/jetty/ee11/servlet/ServletApiResponse.java b/jetty-ee11/jetty-ee11-servlet/src/main/java/org/eclipse/jetty/ee11/servlet/ServletApiResponse.java index 39a3f311930..877a1e0f217 100644 --- a/jetty-ee11/jetty-ee11-servlet/src/main/java/org/eclipse/jetty/ee11/servlet/ServletApiResponse.java +++ b/jetty-ee11/jetty-ee11-servlet/src/main/java/org/eclipse/jetty/ee11/servlet/ServletApiResponse.java @@ -15,6 +15,7 @@ package org.eclipse.jetty.ee11.servlet; import java.io.IOException; import java.io.PrintWriter; +import java.nio.charset.Charset; import java.util.Collection; import java.util.EnumSet; import java.util.Locale; @@ -339,6 +340,12 @@ public class ServletApiResponse implements HttpServletResponse getServletResponseInfo().setCharacterEncoding(encoding, ServletContextResponse.EncodingFrom.SET_CHARACTER_ENCODING); } + @Override + public void setCharacterEncoding(Charset encoding) + { + setCharacterEncoding(encoding == null ? null : encoding.name()); + } + @Override public void setContentLength(int len) {