Skip to content

Commit

Permalink
don't retry if the connection failed at TLS level
Browse files Browse the repository at this point in the history
... for example due to bad certificate; it is pointless as it will
fail exactly the same way.
  • Loading branch information
mistmist committed Jun 21, 2024
1 parent 2f994d1 commit 681b512
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/libcmis/session-factory.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,13 @@ namespace libcmis
{
response = httpSession->httpGetRequest( bindingUrl );
}
catch ( const CurlException& )
catch (const CurlException& e)
{
if (strcmp(e.what(), "Invalid SSL certificate") == 0)
{
// no point in trying other protocols
throw e.getCmisException();
}
// Could be SharePoint - needs NTLM authentication
session = new SharePointSession( bindingUrl, username,
password, verbose );
Expand Down

0 comments on commit 681b512

Please sign in to comment.