Skip to content

Commit

Permalink
Fix response headers forwarding in error responses
Browse files Browse the repository at this point in the history
  • Loading branch information
timsazon committed Dec 13, 2019
1 parent 51e558b commit a322803
Showing 1 changed file with 1 addition and 2 deletions.
Expand Up @@ -306,8 +306,7 @@ private String formatRequest(ServerRequest request) {
}

private Mono<? extends Void> write(ServerWebExchange exchange, ServerResponse response) {
// force content-type since writeTo won't overwrite response header values
exchange.getResponse().getHeaders().setContentType(response.headers().getContentType());
exchange.getResponse().getHeaders().clear();
return response.writeTo(exchange, new ResponseContext());
}

Expand Down

0 comments on commit a322803

Please sign in to comment.