prevent full feed fetching next time we fetch it if caching header values changed but content did not (#1037)

This commit is contained in:
Athou
2023-01-27 08:08:50 +01:00
parent 5c2454c331
commit ea4b120a85
5 changed files with 99 additions and 2 deletions

View File

@@ -182,11 +182,28 @@ public class HttpGetter {
System.out.println(new String(result.content));
}
@Getter
public static class NotModifiedException extends Exception {
private static final long serialVersionUID = 1L;
/**
* if the value of this header changed, this is its new value
*/
private String newLastModifiedHeader;
/**
* if the value of this header changed, this is its new value
*/
private String newEtagHeader;
public NotModifiedException(String message) {
this(message, null, null);
}
public NotModifiedException(String message, String newLastModifiedHeader, String newEtagHeader) {
super(message);
this.newLastModifiedHeader = newLastModifiedHeader;
this.newEtagHeader = newEtagHeader;
}
}