Actions
Bug #7519
closedhttp_request_* can't fallback on wget and doesn't warn if curl is missing
Pull Request:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
Fix check:
Regression:
Description
If you try to use file_download.cf without curl or wget installed, it provides a nice report:
R: [ERROR] Promise could not be repaired, error encountered: Unable to download http://www.normation.com/robots.txt: neither wget or curl are installed
However, http_request_check_status_headers fails without a clear explanation:
error: Command related to promiser '${paths.path[curl]}' returned code defined as promise failed 1 notice: Q: "...ath[curl]} -I -": sh: ${paths.path[curl]}: bad substitution error: Method 'http_request_check_status_headers' failed in some repairs error: Command related to promiser '${paths.path[curl]}' returned code defined as promise failed 1 notice: Q: "...ath[curl]} -I -": sh: ${paths.path[curl]}: bad substitution error: Method 'http_request_check_status_headers' failed in some repairs
For consistency, and for general ease of use, we should test that curl is available before using it, and preferably fallback on wget if it's available too.
Actions