mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
Consistently refer to URLs and URIs in documentation
(cherry picked from commit 04186fdf0e)
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
|
||||
[.small]#xref:web/webflux/uri-building.adoc[See equivalent in the Reactive stack]#
|
||||
|
||||
This section describes various options available in the Spring Framework to work with URI's.
|
||||
This section describes various options available in the Spring Framework to work with URIs.
|
||||
|
||||
include::partial$web/web-uris.adoc[leveloffset=+1]
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
= UriComponents
|
||||
[.small]#Spring MVC and Spring WebFlux#
|
||||
|
||||
`UriComponentsBuilder` helps to build URI's from URI templates with variables, as the following example shows:
|
||||
`UriComponentsBuilder` helps to build URIs from URI templates with variables, as the following example shows:
|
||||
|
||||
[tabs]
|
||||
======
|
||||
@@ -247,7 +247,7 @@ and treats deviations from the syntax as illegal.
|
||||
https://github.com/web-platform-tests/wpt/tree/master/url[URL parsing algorithm] in the
|
||||
https://url.spec.whatwg.org[WhatWG URL Living standard]. It provides lenient handling of
|
||||
a wide range of cases of unexpected input. Browsers implement this in order to handle
|
||||
leniently user typed URL's. For more details, see the URL Living Standard and URL parsing
|
||||
leniently user typed URLs. For more details, see the URL Living Standard and URL parsing
|
||||
https://github.com/web-platform-tests/wpt/tree/master/url[test cases].
|
||||
|
||||
By default, `RestClient`, `WebClient`, and `RestTemplate` use the RFC parser type, and
|
||||
@@ -255,10 +255,10 @@ expect applications to provide with URL templates that conform to RFC syntax. To
|
||||
that you can customize the `UriBuilderFactory` on any of the clients.
|
||||
|
||||
Applications and frameworks may further rely on `UriComponentsBuilder` for their own needs
|
||||
to parse user provided URL's in order to inspect and possibly validated URI components
|
||||
to parse user provided URLs in order to inspect and possibly validated URI components
|
||||
such as the scheme, host, port, path, and query. Such components can decide to use the
|
||||
WhatWG parser type in order to handle URL's more leniently, and to align with the way
|
||||
browsers parse URI's, in case of a redirect to the input URL or if it is included in a
|
||||
WhatWG parser type in order to handle URLs more leniently, and to align with the way
|
||||
browsers parse URIs, in case of a redirect to the input URL or if it is included in a
|
||||
response to a browser.
|
||||
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@ public final class UrlHandlerFilter extends OncePerRequestFilter {
|
||||
public interface Builder {
|
||||
|
||||
/**
|
||||
* Add a handler for URL's with a trailing slash.
|
||||
* Add a handler for URLs with a trailing slash.
|
||||
* @param pathPatterns path patterns to map the handler to, for example,
|
||||
* <code>"/path/*"</code>, <code>"/path/**"</code>,
|
||||
* <code>"/path/foo/"</code>.
|
||||
|
||||
+1
-1
@@ -117,7 +117,7 @@ public final class UrlHandlerFilter implements WebFilter {
|
||||
public interface Builder {
|
||||
|
||||
/**
|
||||
* Add a handler for URL's with a trailing slash.
|
||||
* Add a handler for URLs with a trailing slash.
|
||||
* @param pathPatterns path patterns to map the handler to, e.g.
|
||||
* <code>"/path/*"</code>, <code>"/path/**"</code>,
|
||||
* <code>"/path/foo/"</code>.
|
||||
|
||||
@@ -26,7 +26,7 @@ import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* Parser for URI's based on RFC 3986 syntax.
|
||||
* Parser for URIs based on RFC 3986 syntax.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 6.2
|
||||
|
||||
@@ -57,7 +57,7 @@ import org.springframework.web.util.UriComponents.UriTemplateVariables;
|
||||
* {@link ParserType#WHAT_WG WhatWG parser type}, based on the algorithm from
|
||||
* the WhatWG <a href="https://url.spec.whatwg.org">URL Living Standard</a>
|
||||
* provides more lenient handling of a wide range of cases that occur in user
|
||||
* types URL's.
|
||||
* types URLs.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @author Rossen Stoyanchev
|
||||
@@ -787,7 +787,7 @@ public class UriComponentsBuilder implements UriBuilder, Cloneable {
|
||||
public enum ParserType {
|
||||
|
||||
/**
|
||||
* This parser type expects URI's to conform to RFC 3986 syntax.
|
||||
* This parser type expects URIs to conform to RFC 3986 syntax.
|
||||
*/
|
||||
RFC,
|
||||
|
||||
@@ -795,7 +795,7 @@ public class UriComponentsBuilder implements UriBuilder, Cloneable {
|
||||
* This parser follows the
|
||||
* <a href="https://url.spec.whatwg.org/#url-parsing">URL parsing algorithm</a>
|
||||
* in the WhatWG URL Living standard that browsers implement to align on
|
||||
* lenient handling of user typed URL's that may not conform to RFC syntax.
|
||||
* lenient handling of user typed URLs that may not conform to RFC syntax.
|
||||
* @see <a href="https://url.spec.whatwg.org">URL Living Standard</a>
|
||||
* @see <a href="https://github.com/web-platform-tests/wpt/tree/master/url">URL tests</a>
|
||||
*/
|
||||
|
||||
@@ -39,9 +39,9 @@ import org.springframework.util.Assert;
|
||||
* Implementation of the
|
||||
* <a href="https://url.spec.whatwg.org/#url-parsing">URL parsing</a> algorithm
|
||||
* of the WhatWG URL Living standard. Browsers use this algorithm to align on
|
||||
* lenient parsing of user typed URL's that may deviate from RFC syntax.
|
||||
* lenient parsing of user typed URLs that may deviate from RFC syntax.
|
||||
* Use this, via {@link UriComponentsBuilder.ParserType#WHAT_WG}, if you need to
|
||||
* leniently handle URL's that don't confirm to RFC syntax, or for alignment
|
||||
* leniently handle URLs that don't confirm to RFC syntax, or for alignment
|
||||
* with browser behavior.
|
||||
*
|
||||
* <p>Comments in this class correlate to the parsing algorithm.
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@ import org.springframework.web.util.UriComponentsBuilder;
|
||||
* <li>{@link Locale}
|
||||
* <li>{@link TimeZone}
|
||||
* <li>{@link ZoneId}
|
||||
* <li>{@link UriBuilder} or {@link UriComponentsBuilder} -- for building URL's
|
||||
* <li>{@link UriBuilder} or {@link UriComponentsBuilder} -- for building URLs
|
||||
* relative to the current request
|
||||
* </ul>
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user