瀏覽代碼

Remove unused code (#1991)

Remove unused code in DefaultBlockExceptionHandler#handle
master
叶枫 GitHub 3 年之前
父節點
當前提交
a1eed7032f
沒有發現已知的金鑰在資料庫的簽署中 GPG Key ID: 4AEE18F83AFDEB23
共有 1 個文件被更改,包括 0 次插入6 次删除
  1. +0
    -6
      sentinel-adapter/sentinel-spring-webmvc-adapter/src/main/java/com/alibaba/csp/sentinel/adapter/spring/webmvc/callback/DefaultBlockExceptionHandler.java

+ 0
- 6
sentinel-adapter/sentinel-spring-webmvc-adapter/src/main/java/com/alibaba/csp/sentinel/adapter/spring/webmvc/callback/DefaultBlockExceptionHandler.java 查看文件

@@ -34,12 +34,6 @@ public class DefaultBlockExceptionHandler implements BlockExceptionHandler {
// Return 429 (Too Many Requests) by default.
response.setStatus(429);

StringBuffer url = request.getRequestURL();

if ("GET".equals(request.getMethod()) && StringUtil.isNotBlank(request.getQueryString())) {
url.append("?").append(request.getQueryString());
}

PrintWriter out = response.getWriter();
out.print("Blocked by Sentinel (flow limiting)");
out.flush();


Loading…
取消
儲存