Sfoglia il codice sorgente

Remove unused code (#1991)

Remove unused code in DefaultBlockExceptionHandler#handle
master
叶枫 GitHub 3 anni fa
parent
commit
a1eed7032f
Non sono state trovate chiavi note per questa firma nel database ID Chiave GPG: 4AEE18F83AFDEB23
1 ha cambiato i file con 0 aggiunte e 6 eliminazioni
  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 Vedi File

@@ -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…
Annulla
Salva