From 60b1dec9b278baf316ee10d266d894bce7a462b4 Mon Sep 17 00:00:00 2001 From: aoshiguchen <1052045476@qq.com> Date: Wed, 23 Nov 2022 18:11:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=85=8D=E7=BD=AE.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/fun/asgc/neutrino/core/web/HttpRequestHandler.java | 3 +-- neutrino-proxy-server/src/main/resources/application.yml | 2 +- neutrino-proxy-server/src/main/resources/logback.xml | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/neutrino-core/src/main/java/fun/asgc/neutrino/core/web/HttpRequestHandler.java b/neutrino-core/src/main/java/fun/asgc/neutrino/core/web/HttpRequestHandler.java index 2d2e0b6f..a158b244 100644 --- a/neutrino-core/src/main/java/fun/asgc/neutrino/core/web/HttpRequestHandler.java +++ b/neutrino-core/src/main/java/fun/asgc/neutrino/core/web/HttpRequestHandler.java @@ -43,7 +43,6 @@ import io.netty.buffer.Unpooled; import io.netty.channel.ChannelHandlerContext; import io.netty.handler.codec.http.FullHttpRequest; import io.netty.handler.codec.http.HttpHeaderNames; -import io.netty.handler.codec.http.HttpHeaderValues; import io.netty.handler.codec.http.HttpResponseStatus; import lombok.extern.slf4j.Slf4j; @@ -115,7 +114,7 @@ public class HttpRequestHandler { HttpResponseWrapper httpResponseWrapper = HttpContextHolder.getHttpResponseWrapper(); httpResponseWrapper.setContent(Unpooled.wrappedBuffer(res.getBytes())); - httpResponseWrapper.headers().add(HttpHeaderNames.CONTENT_TYPE, HttpHeaderValues.APPLICATION_JSON); + httpResponseWrapper.headers().add(HttpHeaderNames.CONTENT_TYPE, "application/json;charset=UTF-8"); httpResponseWrapper.writeAndFlush(); return; } else if(HttpRouterType.PAGE == httpRouteResult.getType()) { diff --git a/neutrino-proxy-server/src/main/resources/application.yml b/neutrino-proxy-server/src/main/resources/application.yml index f767f813..603a7fdb 100644 --- a/neutrino-proxy-server/src/main/resources/application.yml +++ b/neutrino-proxy-server/src/main/resources/application.yml @@ -3,7 +3,7 @@ neutrino: name: neutrino-proxy-server http: enable: true - port: 8080 + port: 8888 context-path: / max-content-length-desc: 128K static-resource: diff --git a/neutrino-proxy-server/src/main/resources/logback.xml b/neutrino-proxy-server/src/main/resources/logback.xml index 7b864774..af3bdb73 100644 --- a/neutrino-proxy-server/src/main/resources/logback.xml +++ b/neutrino-proxy-server/src/main/resources/logback.xml @@ -1,6 +1,6 @@ - +