Project

General

Profile

Actions

Bug #7519

closed

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

Bug #7519: http_request_* can't fallback on wget and doesn't warn if curl is missing

Added by Jonathan CLARKE about 10 years ago. Updated over 3 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

Updated by Jonathan CLARKE about 10 years ago Actions #1

  • Subject changed from http_request_check_status_headers can't fallback on wget and doesn't warn if curl is missing to http_request_* can't fallback on wget and doesn't warn if curl is missing

Several methods are concerned:

  • http_request_check_status_headers
  • http_request_content_headers

Updated by Jonathan CLARKE about 10 years ago Actions #2

  • Related to Bug #7521: Tests do not work on AIX added

Updated by Jonathan CLARKE about 10 years ago Actions #3

  • Status changed from New to In progress
  • Assignee set to Jonathan CLARKE

Updated by Jonathan CLARKE about 10 years ago Actions #4

  • Status changed from In progress to Pending technical review
  • Assignee changed from Jonathan CLARKE to Benoît PECCATTE
  • Pull Request set to https://github.com/Normation/ncf/pull/285

Updated by Jonathan CLARKE about 10 years ago Actions #5

  • Status changed from Pending technical review to Pending release
  • % Done changed from 0 to 100

Updated by Vincent MEMBRÉ over 9 years ago Actions #7

  • Status changed from Pending release to Released

Updated by Alexis Mousset over 3 years ago Actions #8

  • Target version changed from 0.x to ncf-0.x
  • Priority set to 0

Updated by Alexis Mousset over 3 years ago Actions #9

  • Project changed from 41 to Rudder
  • Category set to Generic methods
Actions

Also available in: PDF Atom