Kaydet (Commit) 6dcd2318 authored tarafından Giuseppe Castagno's avatar Giuseppe Castagno

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/27636Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarGiuseppe Castagno <giuseppe.castagno@acca-esse.eu>
üst 211cb2de
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment