[ZBX-17518] CurlHttpRequest requires second param on CentOS Created: 2020 Mar 27  Updated: 2024 Apr 10  Resolved: 2020 Mar 29

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Proxy (P), Server (S)
Affects Version/s: 5.0.0alpha4
Fix Version/s: 4.4.8rc1, 5.0.0alpha4, 5.0 (plan)

Type: Problem report Priority: Trivial
Reporter: Vjaceslavs Bogdanovs Assignee: Vladislavs Sokurenko
Resolution: Fixed Votes: 0
Labels: CentOS, http, webhook
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Team: Team A
Sprint: Sprint 62 (Mar 2020)
Story Points: 0.125

 Description   

Steps to reproduce:

  1. Create webhook with the following code:
    var response,
        request = new CurlHttpRequest(),
        url = 'https://postman-echo.com/get';
     
    request.AddHeader('Custom-header: 12345');
    response = request.Get(url);
    
    return response;
  2. Execute test from Frontend.
  3. Observe that webhook returns '1'
  4. Change webhook code to the following:
    var response,
        request = new CurlHttpRequest(),
        url = 'https://postman-echo.com/get';
     
    request.AddHeader('Custom-header: 12345');
    response = request.Get(url, '');
    
    return response;
  5. Observe that webhook returns expected result:
    var response,{
        "args": {},
        "headers": {
            "x-forwarded-proto": "https",
            "host": "postman-echo.com",
            "accept": "*\/*",
            "content-type": "application\/x-www-form-urlencoded",
            "custom-header": "12345",
            "x-forwarded-port": "443"
        },
        "url": "https:\/\/postman-echo.com\/get"
    }

Expected:
It is expected for HTTP requests to not have required empty data field.



 Comments   
Comment by Vladislavs Sokurenko [ 2020 Mar 27 ]

Fixed in:

  • pre-4.4.8rc1 79a8533402a
  • pre-5.0.0beta1 (master) 574f9beddb1
Generated at Sun Apr 27 11:05:55 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.