Skip to content

Commit 702e01a

Browse files
committed
UrlResource applies StringUtils.getFilename against cleaned URL path
Issue: SPR-15411
1 parent 67ea4b3 commit 702e01a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-core/src/main/java/org/springframework/core/io/UrlResource.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ public Resource createRelative(String relativePath) throws MalformedURLException
243243
*/
244244
@Override
245245
public String getFilename() {
246-
return StringUtils.getFilename(this.url.getPath());
246+
return StringUtils.getFilename(this.cleanedUrl.getPath());
247247
}
248248

249249
/**

0 commit comments

Comments
 (0)