Skip to content

Commit 717e6dd

Browse files
committed
Revise ServletUriComponentsBuilder javadoc
Issue: SPR-17255
1 parent 7f82c19 commit 717e6dd

File tree

1 file changed

+8
-24
lines changed

1 file changed

+8
-24
lines changed

spring-webmvc/src/main/java/org/springframework/web/servlet/support/ServletUriComponentsBuilder.java

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,11 @@ protected ServletUriComponentsBuilder(ServletUriComponentsBuilder other) {
8080
/**
8181
* Prepare a builder from the host, port, scheme, and context path of the
8282
* given HttpServletRequest.
83-
*
8483
* <p><strong>Note:</strong> This method extracts values from "Forwarded"
8584
* and "X-Forwarded-*" headers if found. See class-level docs.
86-
*
8785
* <p>As of 4.3.15, this method replaces the contextPath with the value
8886
* of "X-Forwarded-Prefix" rather than prepending, thus aligning with
89-
* {@code ForwardedHeaderFiller}.
87+
* {@code ForwardedHeaderFilter}.
9088
*/
9189
public static ServletUriComponentsBuilder fromContextPath(HttpServletRequest request) {
9290
ServletUriComponentsBuilder builder = initFromRequest(request);
@@ -102,13 +100,11 @@ public static ServletUriComponentsBuilder fromContextPath(HttpServletRequest req
102100
* will end with "/main". If the servlet is mapped otherwise, e.g.
103101
* {@code "/"} or {@code "*.do"}, the result will be the same as
104102
* if calling {@link #fromContextPath(HttpServletRequest)}.
105-
*
106103
* <p><strong>Note:</strong> This method extracts values from "Forwarded"
107104
* and "X-Forwarded-*" headers if found. See class-level docs.
108-
*
109105
* <p>As of 4.3.15, this method replaces the contextPath with the value
110106
* of "X-Forwarded-Prefix" rather than prepending, thus aligning with
111-
* {@code ForwardedHeaderFiller}.
107+
* {@code ForwardedHeaderFilter}.
112108
*/
113109
public static ServletUriComponentsBuilder fromServletMapping(HttpServletRequest request) {
114110
ServletUriComponentsBuilder builder = fromContextPath(request);
@@ -121,13 +117,11 @@ public static ServletUriComponentsBuilder fromServletMapping(HttpServletRequest
121117
/**
122118
* Prepare a builder from the host, port, scheme, and path (but not the query)
123119
* of the HttpServletRequest.
124-
*
125120
* <p><strong>Note:</strong> This method extracts values from "Forwarded"
126121
* and "X-Forwarded-*" headers if found. See class-level docs.
127-
*
128122
* <p>As of 4.3.15, this method replaces the contextPath with the value
129123
* of "X-Forwarded-Prefix" rather than prepending, thus aligning with
130-
* {@code ForwardedHeaderFiller}.
124+
* {@code ForwardedHeaderFilter}.
131125
*/
132126
public static ServletUriComponentsBuilder fromRequestUri(HttpServletRequest request) {
133127
ServletUriComponentsBuilder builder = initFromRequest(request);
@@ -138,13 +132,11 @@ public static ServletUriComponentsBuilder fromRequestUri(HttpServletRequest requ
138132
/**
139133
* Prepare a builder by copying the scheme, host, port, path, and
140134
* query string of an HttpServletRequest.
141-
*
142135
* <p><strong>Note:</strong> This method extracts values from "Forwarded"
143136
* and "X-Forwarded-*" headers if found. See class-level docs.
144-
*
145137
* <p>As of 4.3.15, this method replaces the contextPath with the value
146138
* of "X-Forwarded-Prefix" rather than prepending, thus aligning with
147-
* {@code ForwardedHeaderFiller}.
139+
* {@code ForwardedHeaderFilter}.
148140
*/
149141
public static ServletUriComponentsBuilder fromRequest(HttpServletRequest request) {
150142
ServletUriComponentsBuilder builder = initFromRequest(request);
@@ -209,13 +201,11 @@ private static String getRequestUriWithForwardedPrefix(HttpServletRequest reques
209201
/**
210202
* Same as {@link #fromContextPath(HttpServletRequest)} except the
211203
* request is obtained through {@link RequestContextHolder}.
212-
*
213204
* <p><strong>Note:</strong> This method extracts values from "Forwarded"
214205
* and "X-Forwarded-*" headers if found. See class-level docs.
215-
*
216206
* <p>As of 4.3.15, this method replaces the contextPath with the value
217207
* of "X-Forwarded-Prefix" rather than prepending, thus aligning with
218-
* {@code ForwardedHeaderFiller}.
208+
* {@code ForwardedHeaderFilter}.
219209
*/
220210
public static ServletUriComponentsBuilder fromCurrentContextPath() {
221211
return fromContextPath(getCurrentRequest());
@@ -224,13 +214,11 @@ public static ServletUriComponentsBuilder fromCurrentContextPath() {
224214
/**
225215
* Same as {@link #fromServletMapping(HttpServletRequest)} except the
226216
* request is obtained through {@link RequestContextHolder}.
227-
*
228217
* <p><strong>Note:</strong> This method extracts values from "Forwarded"
229218
* and "X-Forwarded-*" headers if found. See class-level docs.
230-
*
231219
* <p>As of 4.3.15, this method replaces the contextPath with the value
232220
* of "X-Forwarded-Prefix" rather than prepending, thus aligning with
233-
* {@code ForwardedHeaderFiller}.
221+
* {@code ForwardedHeaderFilter}.
234222
*/
235223
public static ServletUriComponentsBuilder fromCurrentServletMapping() {
236224
return fromServletMapping(getCurrentRequest());
@@ -239,13 +227,11 @@ public static ServletUriComponentsBuilder fromCurrentServletMapping() {
239227
/**
240228
* Same as {@link #fromRequestUri(HttpServletRequest)} except the
241229
* request is obtained through {@link RequestContextHolder}.
242-
*
243230
* <p><strong>Note:</strong> This method extracts values from "Forwarded"
244231
* and "X-Forwarded-*" headers if found. See class-level docs.
245-
*
246232
* <p>As of 4.3.15, this method replaces the contextPath with the value
247233
* of "X-Forwarded-Prefix" rather than prepending, thus aligning with
248-
* {@code ForwardedHeaderFiller}.
234+
* {@code ForwardedHeaderFilter}.
249235
*/
250236
public static ServletUriComponentsBuilder fromCurrentRequestUri() {
251237
return fromRequestUri(getCurrentRequest());
@@ -254,13 +240,11 @@ public static ServletUriComponentsBuilder fromCurrentRequestUri() {
254240
/**
255241
* Same as {@link #fromRequest(HttpServletRequest)} except the
256242
* request is obtained through {@link RequestContextHolder}.
257-
*
258243
* <p><strong>Note:</strong> This method extracts values from "Forwarded"
259244
* and "X-Forwarded-*" headers if found. See class-level docs.
260-
*
261245
* <p>As of 4.3.15, this method replaces the contextPath with the value
262246
* of "X-Forwarded-Prefix" rather than prepending, thus aligning with
263-
* {@code ForwardedHeaderFiller}.
247+
* {@code ForwardedHeaderFilter}.
264248
*/
265249
public static ServletUriComponentsBuilder fromCurrentRequest() {
266250
return fromRequest(getCurrentRequest());

0 commit comments

Comments
 (0)