Browse Source

Merge branch '6.2.x'

pull/34532/head
Juergen Hoeller 1 year ago
parent
commit
3632c09348
  1. 5
      spring-core/src/main/java/org/springframework/core/io/AbstractFileResolvingResource.java

5
spring-core/src/main/java/org/springframework/core/io/AbstractFileResolvingResource.java

@ -81,7 +81,10 @@ public abstract class AbstractFileResolvingResource extends AbstractResource { @@ -81,7 +81,10 @@ public abstract class AbstractFileResolvingResource extends AbstractResource {
}
}
}
if (con.getContentLengthLong() > 0) {
// Check content-length entry but not for JarURLConnection where
// this would open the jar file but effectively never close it ->
// for jar entries, always fall back to stream existence instead.
if (!(con instanceof JarURLConnection) && con.getContentLengthLong() > 0) {
return true;
}
if (httpCon != null) {

Loading…
Cancel
Save