diff --git a/app/src/main/java/com/fongmi/android/tv/server/process/Local.java b/app/src/main/java/com/fongmi/android/tv/server/process/Local.java index 960792f4c..c579fa05a 100644 --- a/app/src/main/java/com/fongmi/android/tv/server/process/Local.java +++ b/app/src/main/java/com/fongmi/android/tv/server/process/Local.java @@ -118,9 +118,9 @@ public class Local implements Process { String ifRange = headers.get("if-range"); String ifNoneMatch = headers.get("if-none-match"); String etag = Integer.toHexString((file.getAbsolutePath() + file.lastModified() + fileLen).hashCode()); + boolean ifRangeMatch = ifRange == null || ifRange.equals(etag); boolean ifNoneMatchHit = ifNoneMatch != null && ("*".equals(ifNoneMatch) || ifNoneMatch.equals(etag)); - boolean ifRangeMatchHit = (ifRange == null || ifRange.equals(etag)); - if (ifRangeMatchHit && range != null && startFrom < fileLen) { + if (ifRangeMatch && range != null && startFrom < fileLen) { if (ifNoneMatchHit) { res = NanoHTTPD.newFixedLengthResponse(NanoHTTPD.Response.Status.NOT_MODIFIED, mime, ""); contentLength = 0;