diff --git a/src/backends/webdav/WebDAVSource.cpp b/src/backends/webdav/WebDAVSource.cpp index e9353230..4e61e4d9 100644 --- a/src/backends/webdav/WebDAVSource.cpp +++ b/src/backends/webdav/WebDAVSource.cpp @@ -967,6 +967,9 @@ bool WebDAVSource::findCollections(const boost::functiongetURI(); Neon::URI &newURI = candidate.m_uri; + bool success = false; + bool isWellKnown = boost::starts_with(candidate.m_uri.m_path, "/.well-known/"); + + // Special hack Google: if we already have results for the current CalDAV + // endpoint, then don't try the legacy one. + if (newURI.m_host == "www.google.com" && + (boost::starts_with(newURI.m_path, "/calendar/dav/") || newURI.m_path =="/calendar/dav") && + haveGoogleCalDAV2) { + SE_LOG_DEBUG(getDisplayName(), "skipping legacy Google CalDAV"); + goto next; + } // Accessing the well-known URIs should lead to a redirect, but // with Yahoo! Calendar all I got was a 502 "connection refused". @@ -1005,8 +1019,6 @@ bool WebDAVSource::findCollections(const boost::function