Forráskód Böngészése

错误请求限制

沈静伟 4 éve
szülő
commit
0351ee772b
1 módosított fájl, 3 hozzáadás és 0 törlés
  1. 3 0
      src/dsb/com/cnd3b/common/restful/WebClientRest.java

+ 3 - 0
src/dsb/com/cnd3b/common/restful/WebClientRest.java

@@ -48,6 +48,9 @@ public class WebClientRest {
 
     @POST
     public String method(@Context HttpServletRequest request, String RequestContent) {
+        if (RequestContent == null || RequestContent.equals("")) {
+            return new D3BReturnObject_Err().setErrMsg("请求正文格式错误,必须为JSONObject格式").toString();
+        }
         /**
          * 验证请求正文是否为规范的SONObject格式
          */