From 9afe9da9c5e442501ec6532aac1e41fc42377961 Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Thu, 16 Sep 2021 12:45:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=8E=A5=E5=8F=A3=E5=AE=9A=E4=B9=89har?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=AF=BC=E5=85=A5=E6=97=A0cmotentType?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/metersphere/api/parse/ApiImportAbstractParser.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/src/main/java/io/metersphere/api/parse/ApiImportAbstractParser.java b/backend/src/main/java/io/metersphere/api/parse/ApiImportAbstractParser.java index f2b3fa6ce5..1d686768ee 100644 --- a/backend/src/main/java/io/metersphere/api/parse/ApiImportAbstractParser.java +++ b/backend/src/main/java/io/metersphere/api/parse/ApiImportAbstractParser.java @@ -63,6 +63,10 @@ public abstract class ApiImportAbstractParser implements ApiImportParser { protected String getBodyType(String contentType) { String bodyType = ""; + if (StringUtils.isBlank(contentType)) { + return bodyType; + } + switch (contentType) { case "application/x-www-form-urlencoded": bodyType = Body.WWW_FROM;