Browse Source

Consistently refer to URLs and URIs in documentation

(cherry picked from commit 04186fdf0e)
6.2.x
Sam Brannen 2 weeks ago
parent
commit
2d10d513e1
  1. 2
      framework-docs/modules/ROOT/pages/web/webmvc/mvc-uri-building.adoc
  2. 10
      framework-docs/modules/ROOT/partials/web/web-uris.adoc
  3. 2
      spring-web/src/main/java/org/springframework/web/filter/UrlHandlerFilter.java
  4. 2
      spring-web/src/main/java/org/springframework/web/filter/reactive/UrlHandlerFilter.java
  5. 2
      spring-web/src/main/java/org/springframework/web/util/RfcUriParser.java
  6. 6
      spring-web/src/main/java/org/springframework/web/util/UriComponentsBuilder.java
  7. 4
      spring-web/src/main/java/org/springframework/web/util/WhatWgUrlParser.java
  8. 2
      spring-webflux/src/main/java/org/springframework/web/reactive/result/method/annotation/ServerWebExchangeMethodArgumentResolver.java

2
framework-docs/modules/ROOT/pages/web/webmvc/mvc-uri-building.adoc

@ -3,7 +3,7 @@ @@ -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]

10
framework-docs/modules/ROOT/partials/web/web-uris.adoc

@ -2,7 +2,7 @@ @@ -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. @@ -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 @@ -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.

2
spring-web/src/main/java/org/springframework/web/filter/UrlHandlerFilter.java

@ -126,7 +126,7 @@ public final class UrlHandlerFilter extends OncePerRequestFilter { @@ -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/&#42;"</code>, <code>"/path/&#42;&#42;"</code>,
* <code>"/path/foo/"</code>.

2
spring-web/src/main/java/org/springframework/web/filter/reactive/UrlHandlerFilter.java

@ -117,7 +117,7 @@ public final class UrlHandlerFilter implements WebFilter { @@ -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/&#42;"</code>, <code>"/path/&#42;&#42;"</code>,
* <code>"/path/foo/"</code>.

2
spring-web/src/main/java/org/springframework/web/util/RfcUriParser.java

@ -26,7 +26,7 @@ import org.springframework.lang.Nullable; @@ -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

6
spring-web/src/main/java/org/springframework/web/util/UriComponentsBuilder.java

@ -57,7 +57,7 @@ import org.springframework.web.util.UriComponents.UriTemplateVariables; @@ -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 { @@ -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 { @@ -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>
*/

4
spring-web/src/main/java/org/springframework/web/util/WhatWgUrlParser.java

@ -39,9 +39,9 @@ import org.springframework.util.Assert; @@ -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.

2
spring-webflux/src/main/java/org/springframework/web/reactive/result/method/annotation/ServerWebExchangeMethodArgumentResolver.java

@ -46,7 +46,7 @@ import org.springframework.web.util.UriComponentsBuilder; @@ -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>
*

Loading…
Cancel
Save