This PR is the final change, where all backends are now purely implemented with async interfaces.
The code changes here replace the LIST call with an async version. This affect all backends (and then some) but the changes are mostly mechanical rewrites of the code.
In many places, the backeds were already prepared for async output, in other some glue was needed.
To reduce the scope of this change, some backends simply report a synchronous result as an async list.
* Removing timeout from Webdav
The timeout will be controlled externally by the TimeoutObservingStream and or the cancellation token.
Timeout for List set to default of 10 minutes
Since filesystems may take quite sometime to list large number of files, the timeout was set to a high value.
Previous timeout of 30 seconds was triggering in a case reported by user.
Timeout for CreateFolder and DeleteAsync was kept to default of 30 seconds.
Minor formmating/refactoring was done.
* Removing timeout from Webdav
The timeout will be controlled externally by the TimeoutObservingStream and or the cancellation token.
Timeout for List set to default of 10 minutes
Since filesystems may take quite sometime to list large number of files, the timeout was set to a high value.
Previous timeout of 30 seconds was triggering in a case reported by user.
Timeout for CreateFolder and DeleteAsync was kept to default of 30 seconds.
Minor formating/refactoring was done.
* Fixes to Integrated Authentication
This is a fix to the webdav when using integrated authentication, the hint for the underlying issue was found on an old [thread] (https://github.com/dotnet/wcf/issues/2923). By setting up a vm environment with Windows 2022 Server+IIS/Webdav it was possible to reproduce the [issue](https://github.com/duplicati/duplicati/issues/5872) and fix it.
Change to validation script is to avoid the requirement of filling the username when integrated authentication is true.
This is a proposal for replacing the deprecated WebClient with the HttpClient.
This commit implements the core functionality following the HttpClientFactory pattern as suggested by the framework. It also supports an alternative approach in areas where the HttpClient pattern is not desirable.
The first backend component to be migrated is WebDav, and the HttpClient pattern is also applied to the update downloader.
Once merged, other backend components can be migrated, eventually removing the deprecated WebClient from the codebase.
Additionally, the debug-profind-file option from webdav, which was a remnant from early development, is removed as it is no longer useful for debugging different webdav server responses.
Without await, the using statement can dispose the Stream before the
call to PutAsync completes, resulting in an ObjectDisposedException.
This fixes#4556.
This updates all projects to target .NET Framework 4.7.1. The
TencentCOS and Tardigrade backends depend on .NET Standard 2.0. When a
.NET Framework prior to 4.7.1 is targeted, the system cannot be sure
that all the dependencies exist, so it copies all dependent assemblies
to the output directory. This causes many assemblies from the System
namespace to become bundled in the release.
https://stackoverflow.com/a/48875007
We had previously attempted to make individual projects target 4.7.1
(see pull request #4242), but this can cause compatibility issues when
4.6.2 projects depend on 4.7.1. projects.
This will require Mono 5.10.0 or greater (previously, we required 5.0.0
or greater).
https://www.mono-project.com/docs/about-mono/releases/5.10.0/#class-libraries
This fixes issue #4234.
- no code changes except those noted below
- projects upgrade to 4.6.2
- wixinstaller project upgraded automatically by VisualStudio
- wixinstaller updated to require 4.6.2
- Library.Encryption changed to Standard2.0 so accommodate update to SharpAesCrypt