This PR adds an explicit check for the status code for a B2 upload to ensure that non-success status codes are treated as failures.
Prior to this PR an upload would be considered a success if it has a failed status code but returns a valid JSON document with a `contentLength` property.
This PR updates the parsing code for errors/messags to avoid trying to read the stream twice.
This also removes the support for the unused HttpWebResponse (which is deprecated).
This fixes pre-calculating the SHA256 hash for AWS SDK requests to S3.
This fixes an issue where a throttled stream would not be throttled correctly, because the AWS library would read the throttled stream twice (once for hashing, and once for transmitting).
To ensure compatibility with Wasabi S3, the hash is also lowercased.
This PR updates the File backend to sanitize filenames returned when listing the directory. For now, the sanitization only removes trailing/leading null characters.
This fixes#6449
The URLs passed to the custom URL parser were not decoding the path part, but passing it directly. This caused problems if the input was correctly URL encoded.
The updated code now correctly decodes the hostname+path parts, and encodes them again.
This PR updates OAuth handling to not retry if the request has been cancelled, as no further attempts will work, but the wait delay would still be applied.
Now the cancellation triggers immediately, even if we are in the wait stage.
If the server returns an error message, that message is now propagated to the client so the user can see what the problem might be.
This re-introduces the debug-propfind feature to dump the PROPFIND response to a file.
It also introduces constants for the option names to be less error prone.
A few minor adjustements were made to the timeouts and the dispose flag.
Ensures that long-running HTTP requests, such as downloads and uploads, do not timeout prematurely.
This change configures specific HttpClient instances with an infinite timeout to accommodate operations that may take an extended period. The default 100s timeout is retained for some operations like registration, where a long delay may indicate a problem.
This PR removes the `OAuthContextSettings` class, and makes the `--oauth-url` option available on each backend that uses it, so it can be configured as part of the destination.
To assemble everything related to configuring OAuth, the code was moved to the `AuthIdOptionsHelper`, such that the usage can be shared between implementations.
This PR also adds the option to set the default OAuth url from the environment variable `DUPLICATI_OAUTH_SERVICE`.
The server can then be set in the following locations (most important last):
- Environment variable
- Server-wide advanced settings
- Backup job advanced settings (or commandline)
- Destination url