Show
Ignore:
Timestamp:
01/30/08 04:49:43 (6 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1201668583 +0000
git-parent:

[d0917666cea8e5f782203cebb922a998c939dfa6]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1201668583 +0000
Message:

make options work in http checks

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/modules/http.c

    re3c8f10 r27bd35b  
    8686} 
    8787static void serf_log_results(noit_module_t *self, noit_check_t check) { 
     88  int expect_code = 200; 
     89  char *code_str; 
    8890  check_info_t *ci = check->closure; 
    8991  struct timeval duration; 
     
    9294  char code[4]; 
    9395  char rt[14]; 
     96 
     97  if(noit_hash_retrieve(check->config, "code", strlen("code"), 
     98                        (void **)&code_str)) 
     99    expect_code = atoi(code_str); 
    94100 
    95101  sub_timeval(ci->finish_time, check->last_fire_time, &duration); 
     
    401407  apr_status_t status; 
    402408  eventer_t newe; 
     409  char *config_url; 
    403410 
    404411  ci = (check_info_t *)check->closure; 
     
    430437  ccl->check = check; 
    431438 
    432   apr_uri_parse(ci->pool, "http://localhost/", &ci->url); 
     439  if(!noit_hash_retrieve(check->config, "url", strlen("url"), 
     440                        (void **)&config_url)) 
     441    config_url = "http://localhost/"; 
     442  apr_uri_parse(ci->pool, config_url, &ci->url); 
     443 
    433444  if (!ci->url.port) { 
    434445    ci->url.port = apr_uri_port_of_scheme(ci->url.scheme);