Skip to content
Permalink
Browse files

Fixes #60 - Handler needs to properly escape characters in the Status…

… description
  • Loading branch information...
ddobrin committed Oct 3, 2018
1 parent 8aa56b6 commit c6953930170d942e8ec2fee7334bdc298ee450bd
@@ -80,6 +80,7 @@ public void handleRequest(final HttpServerExchange exchange) throws Exception {
Status status = requestValidator.validateRequest(requestPath, exchange, openApiOperation);
if(status != null) {
exchange.setStatusCode(status.getStatusCode());
status.setDescription(status.getDescription().replaceAll("\\\\", "\\\\\\\\"));
exchange.getResponseSender().send(status.toString());
if(config.logError) logger.error("ValidationError:" + status.toString());
return;
@@ -82,6 +82,7 @@ public void handleRequest(final HttpServerExchange exchange) throws Exception {
Status status = requestValidator.validateRequest(requestPath, exchange, swaggerOperation);
if(status != null) {
exchange.setStatusCode(status.getStatusCode());
status.setDescription(status.getDescription().replaceAll("\\\\", "\\\\\\\\"));
exchange.getResponseSender().send(status.toString());
if(config.isLogError()) logger.error("ValidationError:" + status.toString());
return;

0 comments on commit c695393

Please sign in to comment.
You can’t perform that action at this time.