|
16 | 16 |
|
17 | 17 | package org.springframework.web.util;
|
18 | 18 |
|
19 |
| -import java.net.InetSocketAddress; |
20 | 19 | import java.net.URI;
|
21 | 20 | import java.nio.charset.Charset;
|
22 | 21 | import java.nio.charset.StandardCharsets;
|
@@ -265,7 +264,8 @@ public static UriComponentsBuilder fromUriString(String uri) throws InvalidUrlEx
|
265 | 264 | * </pre>
|
266 | 265 | * @param httpUrl the source URI
|
267 | 266 | * @return the URI components of the URI
|
268 |
| - * @deprecated as of 6.2, in favor of {@link #fromUriString(String)} |
| 267 | + * @deprecated as of 6.2, in favor of {@link #fromUriString(String)}; |
| 268 | + * scheduled for removal in 8.0. |
269 | 269 | */
|
270 | 270 | @Deprecated(since = "6.2")
|
271 | 271 | public static UriComponentsBuilder fromHttpUrl(String httpUrl) throws InvalidUrlException {
|
@@ -298,26 +298,6 @@ public static UriComponentsBuilder fromHttpRequest(HttpRequest request) {
|
298 | 298 | return ForwardedHeaderUtils.adaptFromForwardedHeaders(request.getURI(), request.getHeaders());
|
299 | 299 | }
|
300 | 300 |
|
301 |
| - /** |
302 |
| - * Parse the first "Forwarded: for=..." or "X-Forwarded-For" header value to |
303 |
| - * an {@code InetSocketAddress} representing the address of the client. |
304 |
| - * @param request a request with headers that may contain forwarded headers |
305 |
| - * @param remoteAddress the current remoteAddress |
306 |
| - * @return an {@code InetSocketAddress} with the extracted host and port, or |
307 |
| - * {@code null} if the headers are not present. |
308 |
| - * @since 5.3 |
309 |
| - * @deprecated in favor of {@link ForwardedHeaderUtils#parseForwardedFor}; |
310 |
| - * to be removed in 6.2 |
311 |
| - */ |
312 |
| - @Deprecated(since = "6.1", forRemoval = true) |
313 |
| - @Nullable |
314 |
| - public static InetSocketAddress parseForwardedFor( |
315 |
| - HttpRequest request, @Nullable InetSocketAddress remoteAddress) { |
316 |
| - |
317 |
| - return ForwardedHeaderUtils.parseForwardedFor( |
318 |
| - request.getURI(), request.getHeaders(), remoteAddress); |
319 |
| - } |
320 |
| - |
321 | 301 | /**
|
322 | 302 | * Create an instance by parsing the "Origin" header of an HTTP request.
|
323 | 303 | * @see <a href="https://tools.ietf.org/html/rfc6454">RFC 6454</a>
|
|
0 commit comments