Open aguglie opened 5 years ago
Hi, I'm trying to intercept and log malformed requests like:
curl 'http://127.0.0.1:4567/servle t_withspace' <h1>Bad Message 400</h1><pre>reason: Illegal character SPACE=' '</pre>%
But I cannot find any why to log this event; I've already tried with after and exception without any result:
after((request, response) -> { if (response.status() != 200) { logger.error("Response is not 200.\n" + "Request: " + requestToString(request) + "\n" + "Response:" + responseToString(response)); } }); exception(Exception.class, (exception, request, response) -> { logger.error("Exception: " + "Request: " + requestToString(request) + "\n" + "Response:" + responseToString(response)); });
I'm using sparkJava 2.9.0
Hi, I'm trying to intercept and log malformed requests like:
But I cannot find any why to log this event; I've already tried with after and exception without any result:
I'm using sparkJava 2.9.0