@Override
  public void handleRequestInternal(
      ServerHttpRequest request,
      ServerHttpResponse response,
      AbstractHttpSockJsSession sockJsSession)
      throws SockJsException {

    try {
      String callback = request.getQueryParams().getFirst("c");
      if (!StringUtils.hasText(callback)) {
        response.setStatusCode(HttpStatus.INTERNAL_SERVER_ERROR);
        response.getBody().write("\"callback\" parameter required".getBytes("UTF-8"));
        return;
      }
    } catch (Throwable t) {
      sockJsSession.tryCloseWithSockJsTransportError(t, CloseStatus.SERVER_ERROR);
      throw new SockJsTransportFailureException("Failed to send error", sockJsSession.getId(), t);
    }

    super.handleRequestInternal(request, response, sockJsSession);
  }