If the check is negative it would depending on the used cache store the value as an empty string. When reading the value this check would thus return "false" even if a value exists.
Allows us to catch exceptions like 404's and thus prevents stuff like:
```
{"reqId":"fnmS0hc+fL4+WXKAruo5","remoteAddr":"192.168.39.100","app":"PHP","message":"file_get_contents(http:\/\/ckamm.blaucloud.de\/\/status.php): failed to open stream: HTTP request failed! HTTP\/1.1 404 Not Found\r\n at \/var\/www\/owncloud\/apps\/files_sharing\/lib\/external\/storage.php#260","level":3,"time":"2016-03-08T21:00:33+00:00","method":"PROPFIND","url":"\/remote.php\/webdav\/"}
```
Adds autodiscovery support to server-to-server sharing as specified in the specification. If no discovery data is found it is using the fallback ownCloud endpoints for legacy support.
Whenever a remote fed share's shareinfo call returns a 404, don't
directly assume the storage is not available by throwing
StorageNotAvailableException. We need to properly throw
NotFoundException to trigger the later logic that calls testRemote()
that verifies that the 404 is not from a broken server but really from
an obsolete share.
Added in isSharable() in incoming remote share.
Added in isSharable() in regular incoming share.
Added in FileInfo to make sure the proper attributes are returned to the
clients.
Most of the time it doesn't make sense to forward Guzzle's
RequestException, so we convert it to StorageNotAvailable instead.
This prevents unpredictable error codes to block access to unrelated
folders needlessly.
Added InvalidArgumentException to catch HTML parsing errors when XML was
expected.
Made convertSabreException more generic to be able to handle more
exception cases.
Whenever an exception occurs during scan of a remote share, the share is
checked for availability. If the storage is gone, it will be removed
automatically.
Also, getDirectoryContent() will now skip unavailable storages.
This fix allows for having the remote ownCloud instance live in a
subpath like "http://example.com/basedir/subdir/owncloud".
Such URLs are now parsed correctly.
Added unit test for URL parsing.