From 27033a7d0a324374d27bcc2d6fe9dd4bc0eb99c9 Mon Sep 17 00:00:00 2001 From: tanghc Date: Thu, 15 Aug 2019 18:00:19 +0800 Subject: [PATCH] =?UTF-8?q?gateway=E6=94=AF=E6=8C=81=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/FileUploadHttpServletRequest.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/gateway/common/FileUploadHttpServletRequest.java b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/gateway/common/FileUploadHttpServletRequest.java index 41218e9d..0a316372 100644 --- a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/gateway/common/FileUploadHttpServletRequest.java +++ b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/gateway/common/FileUploadHttpServletRequest.java @@ -55,6 +55,14 @@ public class FileUploadHttpServletRequest implements HttpServletRequest { return data.length; } + /** + * 最关键这个要返回正确 + */ + @Override + public String getContentType() { + return serverHttpRequest.getHeaders().getContentType().toString(); + } + @Override public String getAuthType() { return null; @@ -235,11 +243,6 @@ public class FileUploadHttpServletRequest implements HttpServletRequest { } - @Override - public String getContentType() { - return serverHttpRequest.getHeaders().getContentType().toString(); - } - @Override public String getParameter(String s) { return null;