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:
Giuseppe Castagno
2016-07-23 12:55:20 +02:00
parent 211cb2dec3
commit 6dcd231892

View File

@@ -1197,7 +1197,11 @@ bool DAVResourceAccess::handleException( const DAVException & e, int errorCount
// if we have a bad connection try again. Up to three times.
case DAVException::DAV_HTTP_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 ) &&
( e.getStatus() != 501 ) &&
errorCount < 3 )
{
return true;