From 3c679ebd887037eb265898abc31d3eded0b791e0 Mon Sep 17 00:00:00 2001 From: "Cloud.Liu" Date: Thu, 10 Sep 2020 18:31:28 +0800 Subject: [PATCH] =?UTF-8?q?KERNEL-5056=20fix:=20=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E5=88=86=E9=9A=94=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/third/socketio/handler/EncoderHandler.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fine-socketio/src/main/java/com/fr/third/socketio/handler/EncoderHandler.java b/fine-socketio/src/main/java/com/fr/third/socketio/handler/EncoderHandler.java index 46b8fb9ec..8c3205de2 100644 --- a/fine-socketio/src/main/java/com/fr/third/socketio/handler/EncoderHandler.java +++ b/fine-socketio/src/main/java/com/fr/third/socketio/handler/EncoderHandler.java @@ -29,7 +29,6 @@ import java.util.jar.Manifest; import com.fr.third.socketio.Configuration; import com.fr.third.socketio.Transport; -import com.fr.third.springframework.beans.propertyeditors.StringArrayPropertyEditor; import io.netty.util.concurrent.Future; import io.netty.util.concurrent.GenericFutureListener; import org.slf4j.Logger; @@ -81,6 +80,8 @@ public class EncoderHandler extends ChannelOutboundHandlerAdapter { private static final Logger log = LoggerFactory.getLogger(EncoderHandler.class); + private static final String SEPARATOR_COMMA = ","; + private final PacketEncoder encoder; private String version; @@ -208,7 +209,7 @@ public class EncoderHandler extends ChannelOutboundHandlerAdapter { if (!isEmpty(allowHeaders)) { String header = res.headers().get(HttpHeaderNames.ACCESS_CONTROL_ALLOW_HEADERS); if (!isEmpty(header)) { - header = header.trim() + StringArrayPropertyEditor.DEFAULT_SEPARATOR + configuration.getAccessControlAllowHeaders(); + header = header.trim() + SEPARATOR_COMMA + configuration.getAccessControlAllowHeaders(); res.headers().set(HttpHeaderNames.ACCESS_CONTROL_ALLOW_HEADERS, header); } else { res.headers().set(HttpHeaderNames.ACCESS_CONTROL_ALLOW_HEADERS, configuration.getAccessControlAllowHeaders());