Skip to content

Commit

Permalink
Etag: Fixed case when timestamps are not the same precision
Browse files Browse the repository at this point in the history
  • Loading branch information
cjmalloy committed Jul 17, 2023
1 parent f66e8a4 commit a20704b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/jasper/util/RestUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ private static <T extends HasModified> String getModifiedPage(Page<T> result) {
var b = etag.get(i);
var prefix = getCommonPrefix(a, b);
var suffix = reverse(getCommonPrefix(reverse(a), reverse(b)));
if (prefix.length() == b.length()) {
if (prefix.length() + suffix.length() >= b.length()) {
etag.set(i, "");
} else if (isNotBlank(prefix)) {
logger.trace("Etag Compression: {}, {}, prefix: {}, suffix: {}", a, b, prefix, suffix);
Expand Down

0 comments on commit a20704b

Please sign in to comment.