Procházet zdrojové kódy

错误请求限制

沈静伟 před 4 roky
rodič
revize
0351ee772b

+ 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格式
          */