You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
UrlResource getFilename should not contain query parameters [SPR-15411] #19974
UrlResource.getFilename uses URL.getFile() instead of URL.getPath()
The URL.getFile() javadocs say :
Gets the file name of this URL. The returned file portion will be the same as getPath(), plus the concatenation of the value of getQuery(), if any. If there is no query portion, this method and getPath() will return identical results.
Thanks for raising this! I've revised UrlResource.getFilename overall, taking URL.getPath() as a starting point and then applying our StringUtils.getFilename delegate, in alignment with other Resource implementations.
Activity
spring-projects-issues commentedon Apr 6, 2017
Juergen Hoeller commented
Thanks for raising this! I've revised
UrlResource.getFilenameoverall, takingURL.getPath()as a starting point and then applying ourStringUtils.getFilenamedelegate, in alignment with otherResourceimplementations.