coar-notify-7 fix for http status 308 not as an apache constant!

This commit is contained in:
frabacche
2024-02-16 12:28:01 +01:00
parent 094637dc0c
commit aafa24d4b5

View File

@@ -80,8 +80,9 @@ public class SendLDNMessageAction implements LDNAction {
}
private boolean isRedirect(int statusCode) {
return statusCode == HttpStatus.SC_MOVED_PERMANENTLY ||
statusCode == HttpStatus.SC_MOVED_TEMPORARILY;
//org.apache.http.HttpStatus has no enum value for 308!
return statusCode == (HttpStatus.SC_TEMPORARY_REDIRECT + 1) ||
statusCode == HttpStatus.SC_TEMPORARY_REDIRECT;
}
private LDNActionStatus handleRedirect(CloseableHttpResponse oldresponse,