Merge branch '3.1.x'

Closes gh-36420
This commit is contained in:
Stephane Nicoll
2023-07-17 10:04:14 +02:00
8 changed files with 17 additions and 17 deletions

View File

@@ -83,10 +83,10 @@ public class HttpExchangesWebFilter implements WebFilter, Ordered {
private void addExchangeOnCommit(ServerWebExchange exchange, PrincipalAndSession principalAndSession) {
RecordableServerHttpRequest sourceRequest = new RecordableServerHttpRequest(exchange.getRequest());
HttpExchange.Started startedHtppExchange = HttpExchange.start(sourceRequest);
HttpExchange.Started startedHttpExchange = HttpExchange.start(sourceRequest);
exchange.getResponse().beforeCommit(() -> {
RecordableServerHttpResponse sourceResponse = new RecordableServerHttpResponse(exchange.getResponse());
HttpExchange finishedExchange = startedHtppExchange.finish(sourceResponse,
HttpExchange finishedExchange = startedHttpExchange.finish(sourceResponse,
principalAndSession::getPrincipal, principalAndSession::getSessionId, this.includes);
this.repository.add(finishedExchange);
return Mono.empty();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2022 the original author or authors.
* Copyright 2012-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -83,7 +83,7 @@ public class HttpExchangesFilter extends OncePerRequestFilter implements Ordered
return;
}
RecordableServletHttpRequest sourceRequest = new RecordableServletHttpRequest(request);
HttpExchange.Started startedHtppExchange = HttpExchange.start(sourceRequest);
HttpExchange.Started startedHttpExchange = HttpExchange.start(sourceRequest);
int status = HttpStatus.INTERNAL_SERVER_ERROR.value();
try {
filterChain.doFilter(request, response);
@@ -91,7 +91,7 @@ public class HttpExchangesFilter extends OncePerRequestFilter implements Ordered
}
finally {
RecordableServletHttpResponse sourceResponse = new RecordableServletHttpResponse(response, status);
HttpExchange finishedExchange = startedHtppExchange.finish(sourceResponse, request::getUserPrincipal,
HttpExchange finishedExchange = startedHttpExchange.finish(sourceResponse, request::getUserPrincipal,
() -> getSessionId(request), this.includes);
this.repository.add(finishedExchange);
}