10000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1633ad2 commit 5ffaea7Copy full SHA for 5ffaea7
spring-core/src/main/java/org/springframework/core/io/AbstractFileResolvingResource.java
@@ -81,7 +81,10 @@ else if (code == HttpURLConnection.HTTP_NOT_FOUND) {
81
}
82
83
84
- if (con.getContentLengthLong() > 0) {
+ // Check content-length entry but not for JarURLConnection where
85
+ // this would open the jar file but effectively never close it ->
86
+ // for jar entries, always fall back to stream existence instead.
87
+ if (!(con instanceof JarURLConnection) && con.getContentLengthLong() > 0) {
88
return true;
89
90
if (httpCon != null) {
0 commit comments