From 702e01ad52c308a2a3197a589b4b83db01ed86fb Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Thu, 6 Apr 2017 14:27:00 +0200 Subject: [PATCH] UrlResource applies StringUtils.getFilename against cleaned URL path Issue: SPR-15411 --- .../src/main/java/org/springframework/core/io/UrlResource.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-core/src/main/java/org/springframework/core/io/UrlResource.java b/spring-core/src/main/java/org/springframework/core/io/UrlResource.java index c3d440c478..02baa97d1a 100644 --- a/spring-core/src/main/java/org/springframework/core/io/UrlResource.java +++ b/spring-core/src/main/java/org/springframework/core/io/UrlResource.java @@ -243,7 +243,7 @@ public class UrlResource extends AbstractFileResolvingResource { */ @Override public String getFilename() { - return StringUtils.getFilename(this.url.getPath()); + return StringUtils.getFilename(this.cleanedUrl.getPath()); } /**