From a3b35d17c2aa7f98f0db9328828c575f13c993f9 Mon Sep 17 00:00:00 2001 From: Frederik Deweerdt Date: Tue, 31 May 2016 09:49:48 -0700 Subject: [PATCH] s/http1-errors/status-errors/ in the json output as well --- lib/handler/status/events.c | 18 +++++++++--------- t/50status.t | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/handler/status/events.c b/lib/handler/status/events.c index 3487e45ad9..147fe8e568 100644 --- a/lib/handler/status/events.c +++ b/lib/handler/status/events.c @@ -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" diff --git a/t/50status.t b/t/50status.t index 5abd18b108..da7987eee4 100644 --- a/t/50status.t +++ b/t/50status.t @@ -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 { @@ -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"; };