You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ta...@apache.org on 2020/04/11 18:05:36 UTC
[myfaces] branch 2.3.x updated: fix: Incorrect Last-Modified header
for resources
This is an automated email from the ASF dual-hosted git repository.
tandraschko pushed a commit to branch 2.3.x
in repository https://gitbox.apache.org/repos/asf/myfaces.git
The following commit(s) were added to refs/heads/2.3.x by this push:
new 9e2ca64 fix: Incorrect Last-Modified header for resources
new 0152e5a Merge pull request #90 from astappiev/patch-1
9e2ca64 is described below
commit 9e2ca6439777bb7cf489de2b1d0f94561a6602ec
Author: Oleh Astappiev <as...@gmail.com>
AuthorDate: Fri Mar 27 15:21:27 2020 +0100
fix: Incorrect Last-Modified header for resources
---
.../myfaces/shared/resource/ResourceLoaderUtils.java | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
diff --git a/shared/src/main/java/org/apache/myfaces/shared/resource/ResourceLoaderUtils.java b/shared/src/main/java/org/apache/myfaces/shared/resource/ResourceLoaderUtils.java
index bfdc6d3..e993dd1 100644
--- a/shared/src/main/java/org/apache/myfaces/shared/resource/ResourceLoaderUtils.java
+++ b/shared/src/main/java/org/apache/myfaces/shared/resource/ResourceLoaderUtils.java
@@ -18,7 +18,6 @@
*/
package org.apache.myfaces.shared.resource;
-import java.io.File;
import java.io.IOException;
import java.net.JarURLConnection;
import java.net.URL;
@@ -79,18 +78,7 @@ public class ResourceLoaderUtils
//Taken from trinidad URLUtils
public static long getResourceLastModified(URL url) throws IOException
{
- if ("file".equals(url.getProtocol()))
- {
- String externalForm = url.toExternalForm();
- // Remove the "file:"
- File file = new File(externalForm.substring(5));
-
- return file.lastModified();
- }
- else
- {
- return getResourceLastModified(url.openConnection());
- }
+ return getResourceLastModified(url.openConnection());
}
//Taken from trinidad URLUtils