Skip to content

Commit

Permalink
fixes networknt#1426 call the interceptors directly if there is no re…
Browse files Browse the repository at this point in the history
…quest body (networknt#1427)
  • Loading branch information
stevehu authored Oct 25, 2022
1 parent dfcb6fd commit d722cbd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ public void handleRequest(HttpServerExchange httpServerExchange) throws Exceptio
throw e;
}

} else {
// no need to inject the content for the body. just call the interceptors here.
this.invokeInterceptors(httpServerExchange);
}
Handler.next(httpServerExchange, next);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public void handleRequest(HttpServerExchange exchange) throws Exception {
String requestURI = (String)result.get("requestURI");
exchange.setRequestURI(requestURI);
break;
case "requestHeader":
case "requestHeaders":
// if requestHeaders object is null, ignore it.
Map<String, Object> requestHeaders = (Map)result.get("requestHeaders");
if(requestHeaders != null) {
Expand Down

0 comments on commit d722cbd

Please sign in to comment.