diff --git a/spring-web/src/main/java/org/springframework/http/codec/ResourceHttpMessageWriter.java b/spring-web/src/main/java/org/springframework/http/codec/ResourceHttpMessageWriter.java index f1517acfda..bbcc49b9be 100644 --- a/spring-web/src/main/java/org/springframework/http/codec/ResourceHttpMessageWriter.java +++ b/spring-web/src/main/java/org/springframework/http/codec/ResourceHttpMessageWriter.java @@ -135,17 +135,6 @@ public class ResourceHttpMessageWriter implements HttpMessageWriter { })); } - /** - * Adds the default headers for the given resource to the given message. - * @since 6.0 - * @deprecated since 6.1, in favor of {@link #addDefaultHeaders(ReactiveHttpOutputMessage, Resource, MediaType, Map)}, - * for removal = 6.2 - */ - @Deprecated(since = "6.1", forRemoval = true) - public void addHeaders(ReactiveHttpOutputMessage message, Resource resource, @Nullable MediaType contentType, Map hints) { - addDefaultHeaders(message, resource, contentType, hints).block(); - } - /** * Adds the default headers for the given resource to the given message. * @since 6.1 diff --git a/spring-web/src/main/java/org/springframework/web/util/UriComponentsBuilder.java b/spring-web/src/main/java/org/springframework/web/util/UriComponentsBuilder.java index 1a64481252..3b80c38f6a 100644 --- a/spring-web/src/main/java/org/springframework/web/util/UriComponentsBuilder.java +++ b/spring-web/src/main/java/org/springframework/web/util/UriComponentsBuilder.java @@ -16,7 +16,6 @@ package org.springframework.web.util; -import java.net.InetSocketAddress; import java.net.URI; import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; @@ -265,7 +264,8 @@ public class UriComponentsBuilder implements UriBuilder, Cloneable { * * @param httpUrl the source URI * @return the URI components of the URI - * @deprecated as of 6.2, in favor of {@link #fromUriString(String)} + * @deprecated as of 6.2, in favor of {@link #fromUriString(String)}; + * scheduled for removal in 8.0. */ @Deprecated(since = "6.2") public static UriComponentsBuilder fromHttpUrl(String httpUrl) throws InvalidUrlException { @@ -298,26 +298,6 @@ public class UriComponentsBuilder implements UriBuilder, Cloneable { return ForwardedHeaderUtils.adaptFromForwardedHeaders(request.getURI(), request.getHeaders()); } - /** - * Parse the first "Forwarded: for=..." or "X-Forwarded-For" header value to - * an {@code InetSocketAddress} representing the address of the client. - * @param request a request with headers that may contain forwarded headers - * @param remoteAddress the current remoteAddress - * @return an {@code InetSocketAddress} with the extracted host and port, or - * {@code null} if the headers are not present. - * @since 5.3 - * @deprecated in favor of {@link ForwardedHeaderUtils#parseForwardedFor}; - * to be removed in 6.2 - */ - @Deprecated(since = "6.1", forRemoval = true) - @Nullable - public static InetSocketAddress parseForwardedFor( - HttpRequest request, @Nullable InetSocketAddress remoteAddress) { - - return ForwardedHeaderUtils.parseForwardedFor( - request.getURI(), request.getHeaders(), remoteAddress); - } - /** * Create an instance by parsing the "Origin" header of an HTTP request. * @see RFC 6454