|
1 | 1 | /*
|
2 |
| - * Copyright 2002-2020 the original author or authors. |
| 2 | + * Copyright 2002-2025 the original author or authors. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
@@ -64,7 +64,8 @@ public class WebSessionServerRequestCache implements ServerRequestCache {
|
64 | 64 | /**
|
65 | 65 | * Sets the matcher to determine if the request should be saved. The default is to
|
66 | 66 | * match on any GET request.
|
67 |
| - * @param saveRequestMatcher |
| 67 | + * @param saveRequestMatcher the {@link ServerWebExchangeMatcher} that determines if |
| 68 | + * the request should be saved |
68 | 69 | */
|
69 | 70 | public void setSaveRequestMatcher(ServerWebExchangeMatcher saveRequestMatcher) {
|
70 | 71 | Assert.notNull(saveRequestMatcher, "saveRequestMatcher cannot be null");
|
@@ -96,7 +97,7 @@ public Mono<URI> getRedirectUri(ServerWebExchange exchange) {
|
96 | 97 | public Mono<ServerHttpRequest> removeMatchingRequest(ServerWebExchange exchange) {
|
97 | 98 | MultiValueMap<String, String> queryParams = exchange.getRequest().getQueryParams();
|
98 | 99 | if (this.matchingRequestParameterName != null && !queryParams.containsKey(this.matchingRequestParameterName)) {
|
99 |
| - this.logger.trace( |
| 100 | + logger.trace( |
100 | 101 | "matchingRequestParameterName is required for getMatchingRequest to lookup a value, but not provided");
|
101 | 102 | return Mono.empty();
|
102 | 103 | }
|
@@ -165,17 +166,4 @@ private static ServerWebExchangeMatcher createDefaultRequestMatcher() {
|
165 | 166 | return new AndServerWebExchangeMatcher(get, notFavicon, html);
|
166 | 167 | }
|
167 | 168 |
|
168 |
| - private static String createQueryString(String queryString, String matchingRequestParameterName) { |
169 |
| - if (matchingRequestParameterName == null) { |
170 |
| - return queryString; |
171 |
| - } |
172 |
| - if (queryString == null || queryString.length() == 0) { |
173 |
| - return matchingRequestParameterName; |
174 |
| - } |
175 |
| - if (queryString.endsWith("&")) { |
176 |
| - return queryString + matchingRequestParameterName; |
177 |
| - } |
178 |
| - return queryString + "&" + matchingRequestParameterName; |
179 |
| - } |
180 |
| - |
181 | 169 | }
|
0 commit comments