Fix uri tag for empty path

See gh-21392
This commit is contained in:
Jon Schneider
2020-05-11 10:40:36 -04:00
committed by Stephane Nicoll
parent 398c80fb69
commit f78f2d57e1
4 changed files with 23 additions and 0 deletions

View File

@@ -110,6 +110,9 @@ public final class WebFluxTags {
if (ignoreTrailingSlash && patternString.length() > 1) {
patternString = TRAILING_SLASH_PATTERN.matcher(patternString).replaceAll("");
}
if (patternString.isEmpty()) {
return URI_ROOT;
}
return Tag.of("uri", patternString);
}
HttpStatus status = exchange.getResponse().getStatusCode();

View File

@@ -115,6 +115,9 @@ public final class WebMvcTags {
if (ignoreTrailingSlash && pattern.length() > 1) {
pattern = TRAILING_SLASH_PATTERN.matcher(pattern).replaceAll("");
}
if (pattern.isEmpty()) {
return URI_ROOT;
}
return Tag.of("uri", pattern);
}
if (response != null) {