Skip to content

Commit

Permalink
s/http1-errors/status-errors/ in the json output as well
Browse files Browse the repository at this point in the history
  • Loading branch information
deweerdt committed May 31, 2016
1 parent bd158bc commit a3b35d1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
18 changes: 9 additions & 9 deletions lib/handler/status/events.c
Expand Up @@ -66,15 +66,15 @@ static h2o_iovec_t events_status_final(void *priv, h2o_globalconf_t *gconf, h2o_
#define BUFSIZE (2*1024)
ret.base = h2o_mem_alloc_pool(&req->pool, BUFSIZE);
ret.len = snprintf(ret.base, BUFSIZE, ",\n"
" \"http1-errors.400\": %" PRIu64 ",\n"
" \"http1-errors.403\": %" PRIu64 ",\n"
" \"http1-errors.404\": %" PRIu64 ",\n"
" \"http1-errors.405\": %" PRIu64 ",\n"
" \"http1-errors.416\": %" PRIu64 ",\n"
" \"http1-errors.417\": %" PRIu64 ",\n"
" \"http1-errors.500\": %" PRIu64 ",\n"
" \"http1-errors.502\": %" PRIu64 ",\n"
" \"http1-errors.503\": %" PRIu64 ",\n"
" \"status-errors.400\": %" PRIu64 ",\n"
" \"status-errors.403\": %" PRIu64 ",\n"
" \"status-errors.404\": %" PRIu64 ",\n"
" \"status-errors.405\": %" PRIu64 ",\n"
" \"status-errors.416\": %" PRIu64 ",\n"
" \"status-errors.417\": %" PRIu64 ",\n"
" \"status-errors.500\": %" PRIu64 ",\n"
" \"status-errors.502\": %" PRIu64 ",\n"
" \"status-errors.503\": %" PRIu64 ",\n"
" \"http2-errors.protocol\": %" PRIu64 ", \n"
" \"http2-errors.internal\": %" PRIu64 ", \n"
" \"http2-errors.flow-control\": %" PRIu64 ", \n"
Expand Down
4 changes: 2 additions & 2 deletions t/50status.t
Expand Up @@ -40,7 +40,7 @@ EOT
my $jresp = decode_json("$resp");
is $jresp->{'connections'}, 1, "One connection";
is $jresp->{'requests'}, undef, "Requests not present";
is $jresp->{'http1-errors.404'}, 0, "Internal errors monitoring";
is $jresp->{'status-errors.404'}, 0, "Internal errors monitoring";
};

subtest "json hander check 404 error counter" => sub {
Expand All @@ -58,7 +58,7 @@ EOT
my $jresp = decode_json("$resp");
is $jresp->{'connections'}, undef, "Connections not present";
is $jresp->{'requests'}, undef, "Requests not present";
is $jresp->{'http1-errors.404'}, 1, "Found the 404 error";
is $jresp->{'status-errors.404'}, 1, "Found the 404 error";
};


Expand Down

0 comments on commit a3b35d1

Please sign in to comment.