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 about 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 #1

Updated by Jonathan CLARKE about 9 years ago

  • 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
Actions #2

Updated by Jonathan CLARKE about 9 years ago

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

Updated by Jonathan CLARKE about 9 years ago

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

Updated by Jonathan CLARKE about 9 years ago

  • 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
Actions #5

Updated by Jonathan CLARKE about 9 years ago

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

Updated by Vincent MEMBRÉ over 8 years ago

  • Status changed from Pending release to Released
Actions #8

Updated by Alexis Mousset over 2 years ago

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

Updated by Alexis Mousset over 2 years ago

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

Also available in: Atom PDF