Merge branch '5.3.x'
# Conflicts: # spring-web/src/main/java/org/springframework/web/util/WebUtils.java
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2021 the original author or authors.
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -629,17 +629,17 @@ public abstract class WebUtils {
|
||||
* following algorithm:
|
||||
* <ol>
|
||||
* <li>Try to get the parameter value using just the given <i>logical</i> name.
|
||||
* This handles parameters of the form <tt>logicalName = value</tt>. For normal
|
||||
* This handles parameters of the form {@code logicalName = value}. For normal
|
||||
* parameters, e.g. submitted using a hidden HTML form field, this will return
|
||||
* the requested value.</li>
|
||||
* <li>Try to obtain the parameter value from the parameter name, where the
|
||||
* parameter name in the request is of the form <tt>logicalName_value = xyz</tt>
|
||||
* parameter name in the request is of the form {@code logicalName_value = xyz}
|
||||
* with "_" being the configured delimiter. This deals with parameter values
|
||||
* submitted using an HTML form submit button.</li>
|
||||
* <li>If the value obtained in the previous step has a ".x" or ".y" suffix,
|
||||
* remove that. This handles cases where the value was submitted using an
|
||||
* HTML form image button. In this case the parameter in the request would
|
||||
* actually be of the form <tt>logicalName_value.x = 123</tt>. </li>
|
||||
* actually be of the form {@code logicalName_value.x = 123}.</li>
|
||||
* </ol>
|
||||
* @param parameters the available parameter map
|
||||
* @param name the <i>logical</i> name of the request parameter
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -192,8 +192,8 @@ class InternalPathPatternParser {
|
||||
* Just hit a ':' and want to jump over the regex specification for this
|
||||
* variable. pos will be pointing at the ':', we want to skip until the }.
|
||||
* <p>
|
||||
* Nested {...} pairs don't have to be escaped: <tt>/abc/{var:x{1,2}}/def</tt>
|
||||
* <p>An escaped } will not be treated as the end of the regex: <tt>/abc/{var:x\\{y:}/def</tt>
|
||||
* Nested {...} pairs don't have to be escaped: <code>/abc/{var:x{1,2}}/def</code>
|
||||
* <p>An escaped } will not be treated as the end of the regex: <code>/abc/{var:x\\{y:}/def</code>
|
||||
* <p>A separator that should not indicate the end of the regex can be escaped:
|
||||
*/
|
||||
private void skipCaptureRegex() {
|
||||
|
||||
@@ -26,9 +26,11 @@ import org.springframework.web.util.pattern.PathPattern.MatchingContext;
|
||||
|
||||
/**
|
||||
* A regex path element. Used to represent any complicated element of the path.
|
||||
* For example in '<tt>/foo/*_*/*_{foobar}</tt>' both <tt>*_*</tt> and <tt>*_{foobar}</tt>
|
||||
* are {@link RegexPathElement} path elements. Derived from the general
|
||||
* {@link org.springframework.util.AntPathMatcher} approach.
|
||||
*
|
||||
* <p>For example in '<code>/foo/*_*/*_{foobar}</code>' both {@code *_*}
|
||||
* and <code>*_{foobar}</code> are {@link RegexPathElement regex path elements}.
|
||||
*
|
||||
* <p>Derived from the general {@link org.springframework.util.AntPathMatcher} approach.
|
||||
*
|
||||
* @author Andy Clement
|
||||
* @since 5.0
|
||||
|
||||
Reference in New Issue
Block a user