tdf#101094 (6) OPTIONS: Do not retry on HTTP error 501
HTTP error 501 the server tells us the used method is not implemented, non need to retry. Change-Id: I4529d2bc27a87e8f3463ded578c6c55e0701ae17 Reviewed-on: https://gerrit.libreoffice.org/27636 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Giuseppe Castagno <giuseppe.castagno@acca-esse.eu>
This commit is contained in:
@@ -1197,7 +1197,11 @@ bool DAVResourceAccess::handleException( const DAVException & e, int errorCount
|
|||||||
// if we have a bad connection try again. Up to three times.
|
// if we have a bad connection try again. Up to three times.
|
||||||
case DAVException::DAV_HTTP_ERROR:
|
case DAVException::DAV_HTTP_ERROR:
|
||||||
// retry up to three times, if not a client-side error.
|
// retry up to three times, if not a client-side error.
|
||||||
|
// exception: error 501, server side error that
|
||||||
|
// tells us the used method is not implemented
|
||||||
|
// on the server, it's nonsense to insist...
|
||||||
if ( ( e.getStatus() < 400 || e.getStatus() >= 500 ) &&
|
if ( ( e.getStatus() < 400 || e.getStatus() >= 500 ) &&
|
||||||
|
( e.getStatus() != 501 ) &&
|
||||||
errorCount < 3 )
|
errorCount < 3 )
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
|
Reference in New Issue
Block a user