Commit e0fa6a27 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

hdtest: Clean up entry names and help message

parent 250d6ede
...@@ -60,7 +60,7 @@ json_t* dump_header_table(nghttp2_hd_context *context) ...@@ -60,7 +60,7 @@ json_t* dump_header_table(nghttp2_hd_context *context)
if(context->role == NGHTTP2_HD_ROLE_DEFLATE) { if(context->role == NGHTTP2_HD_ROLE_DEFLATE) {
json_object_set_new(obj, "localSize", json_object_set_new(obj, "localSize",
json_integer(context->local_hd_table_bufsize)); json_integer(context->local_hd_table_bufsize));
json_object_set_new(obj, "localMaxSize", json_object_set_new(obj, "maxLocalSize",
json_integer(context->local_hd_table_bufsize_max)); json_integer(context->local_hd_table_bufsize_max));
} }
return obj; return obj;
......
...@@ -47,7 +47,7 @@ static void output_to_json(nghttp2_hd_context *deflater, ...@@ -47,7 +47,7 @@ static void output_to_json(nghttp2_hd_context *deflater,
json_object_set_new(obj, "seq", json_integer(seq)); json_object_set_new(obj, "seq", json_integer(seq));
json_object_set_new(obj, "inputLen", json_integer(inputlen)); json_object_set_new(obj, "inputLen", json_integer(inputlen));
json_object_set_new(obj, "outputLength", json_integer(len)); json_object_set_new(obj, "outputLength", json_integer(len));
json_object_set_new(obj, "PercentageOfOriginalSize", json_object_set_new(obj, "percentageOfOriginalSize",
json_real((double)len / inputlen * 100)); json_real((double)len / inputlen * 100));
to_hex(hex, buf, len); to_hex(hex, buf, len);
json_object_set_new(obj, "output", json_pack("s#", hex, len * 2)); json_object_set_new(obj, "output", json_pack("s#", hex, len * 2));
...@@ -234,13 +234,13 @@ static void print_help(void) ...@@ -234,13 +234,13 @@ static void print_help(void)
"Example:\n" "Example:\n"
"[\n" "[\n"
" {\n" " {\n"
" \"headers\": [\n" " \"headers\": [\n"
" [ \":method\", \"GET\" ],\n" " [ \":method\", \"GET\" ],\n"
" [ \":path\", \"/\" ]\n" " [ \":path\", \"/\" ]\n"
" ]\n" " ]\n"
" },\n" " },\n"
" {\n" " {\n"
" \"headers\": [\n" " \"headers\": [\n"
" [ \":method\", \"POST\" ],\n" " [ \":method\", \"POST\" ],\n"
" [ \":path\", \"/\" ]\n" " [ \":path\", \"/\" ]\n"
" ]\n" " ]\n"
......
...@@ -146,7 +146,7 @@ static void print_help(void) ...@@ -146,7 +146,7 @@ static void print_help(void)
"Reads JSON array from stdin and outputs inflated name/value pairs\n" "Reads JSON array from stdin and outputs inflated name/value pairs\n"
"in JSON array.\n" "in JSON array.\n"
"The element of input array must be a JSON object. Each object must\n" "The element of input array must be a JSON object. Each object must\n"
"have following key:\n" "have at least following key:\n"
"\n" "\n"
" output: deflated header block in hex-string.\n" " output: deflated header block in hex-string.\n"
"\n" "\n"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment