Introduce the Download#FailOnError option. (#195)

* Introduce the Download#FailOnError option.

The change also adds logging of download operations to the wrapper log

* Add documentation for the failOnError flag
This commit is contained in:
Oleg Nenashev
2017-04-11 22:57:39 +02:00
committed by GitHub
parent 5803d3ce15
commit f0770a0e15
6 changed files with 111 additions and 6 deletions

View File

@@ -159,12 +159,20 @@ For servers requiring authentication some parameters must be specified depending
The parameter “unsecureAuth” is only effective when the transfer protocol is HTTP - unencrypted data transfer. This is a security vulnerability because the credentials are send in clear text! For a SSPI authentication this is not relevant because the authentication tokens are encrypted.
For target servers using the HTTPS transfer protocol it is necessary, that the CA which issued the server certificate is trusted by the client. This is normally the situation when the server ist located in the Internet. When an organisation is using a self issued CA for the intranet this probably is not the case. In this case it is necessary to import the CA to the Certificate MMC of the Windows client. Have a look to the instructions on this [site](https://msdn.microsoft.com/de-de/library/system.net.credentialcache.defaultcredentials(v=vs.85).aspx). The self issued CA must be imported to the Trusted Root Certification Authorities for the computer.
```
By default, the `download` command does not fail the service startup if the operation fails (e.g. `from` is not available).
In order to force the download failure in such case, it is possible to specify the `failOnError` boolean attribute.
Examples:
```xml
<download from="http://example.com/some.dat" to="%BASE%\some.dat" />
<download from="http://example.com/some.dat" to="%BASE%\some.dat" failOnError="true"/>
<download from="https://example.com/some.dat" to="%BASE%\some.dat" auth="sspi" />
<download from="https://example.com/some.dat" to="%BASE%\some.dat"
<download from="https://example.com/some.dat" to="%BASE%\some.dat" failOnError="true"
auth="basic" username="aUser" password="aPassw0rd" />
<download from="http://example.com/some.dat" to="%BASE%\some.dat"