Преглед на файлове

Remove unused code (#1991)

Remove unused code in DefaultBlockExceptionHandler#handle
master
叶枫 GitHub преди 3 години
родител
ревизия
a1eed7032f
No known key found for this signature in database 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…
Отказ
Запис