Project

General

Profile

Actions

Bug #7519

closed

http_request_* can't fallback on wget and doesn't warn if curl is missing

Added by Jonathan CLARKE almost 9 years ago. Updated over 2 years ago.

Status:
Released
Priority:
N/A
Category:
Generic methods
Target version:
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.


Subtasks 1 (0 open1 closed)

Bug #7558: http_request_* port to use new log interface on masterReleasedBenoît PECCATTEActions

Related issues 1 (0 open1 closed)

Related to Rudder - Bug #7521: Tests do not work on AIXReleasedBenoît PECCATTEActions
Actions

Also available in: Atom PDF