Skip to content

Commit

Permalink
Remove deprecated methods scheduled for removal in 6.2
Browse files Browse the repository at this point in the history
  • Loading branch information
poutsma committed Jul 1, 2024
1 parent 5864f57 commit bd4823e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,17 +135,6 @@ private Mono<Void> writeResource(Resource resource, ResolvableType type, @Nullab
}));
}

/**
* 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<String, Object> hints) {
addDefaultHeaders(message, resource, contentType, hints).block();
}

/**
* Adds the default headers for the given resource to the given message.
* @since 6.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -265,7 +264,8 @@ public static UriComponentsBuilder fromUriString(String uri) throws InvalidUrlEx
* </pre>
* @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 {
Expand Down Expand Up @@ -298,26 +298,6 @@ public static UriComponentsBuilder fromHttpRequest(HttpRequest request) {
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 <a href="https://tools.ietf.org/html/rfc6454">RFC 6454</a>
Expand Down

0 comments on commit bd4823e

Please sign in to comment.