Ad Widget

Collapse

http HEAD option

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lamont
    Member
    • Nov 2007
    • 89

    #1

    http HEAD option

    sorry, i'm way busy, no code for this, but a suggestion:

    in httptest.c zabbix does a conditional POST:

    if(httpstep.posts[0] != 0)
    {
    zabbix_log(LOG_LEVEL_DEBUG, "WEBMonitor: use post [%s]", httpstep.posts);
    if(CURLE_OK != (err = curl_easy_setopt(easyhandle, CURLOPT_POSTFIELDS, httpstep.posts)))
    {
    zabbix_log(LOG_LEVEL_ERR, "Cannot set POST vars [%s]",
    curl_easy_strerror(err));
    err_str = strdup(curl_easy_strerror(err));
    lastfailedstep = httpstep.no;
    }
    }

    It would be useful to similarly do a conditional HEAD request, via setting CURLOPT_NOBODY based on a new flag in the httpstep (requiring a new flag in the schema for an httpstep and a new checkbox in the UI for creating an httpstep).

    it should be fairly straight-forwards change, but it'd require changes to the zabbix_server the database schema and the UI to be able to use it.
Working...