docs: public void redirect(String location, int httpStatusCode) {
          if (LOG.isDebugEnabled()) {
              LOG.debug("Redirecting ({} to {}", httpStatusCode, location);
          }
          response.setStatus(httpStatusCode);
          response.setHeader("Location", location);
          response.setHeader("Connection", "close");
          try {
              response.sendError(httpStatusCode);
          } catch (IOException e) {
              LOG.warn("Exception when trying to redirect permanently", e);
          }
      }