From 927083cbfc5f1598cc909e8d5f0bb34a42713f5b Mon Sep 17 00:00:00 2001 From: "Yichun Zhang (agentzh)" Date: Fri, 17 Jul 2015 11:40:51 +0800 Subject: [PATCH 1/2] tests: disabled the test cases exercising multiple http {} blocks since this undocumented feature has been disabled since nginx 1.9.3. --- t/unused.t | 3 +++ 1 file changed, 3 insertions(+) diff --git a/t/unused.t b/t/unused.t index 914836d..86852d4 100644 --- a/t/unused.t +++ b/t/unused.t @@ -71,6 +71,9 @@ ok === TEST 3: used (multi http {} blocks) +This test case won't run with nginx 1.9.3+ since duplicate http {} blocks +have been prohibited since then. +--- SKIP --- http_config eval: $::http_config --- config location = /t { From c718a3b95446fac53ebe274b11162118ea068f71 Mon Sep 17 00:00:00 2001 From: "Yichun Zhang (agentzh)" Date: Sun, 1 Nov 2015 11:54:30 +0800 Subject: [PATCH 2/2] bugfix: fixed errors and warnings with C compilers without variadic macro support. --- src/ddebug.h | 7 ++++--- src/ngx_http_rds_csv_output.c | 4 ++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/ddebug.h b/src/ddebug.h index d6a268f..5c15a74 100644 --- a/src/ddebug.h +++ b/src/ddebug.h @@ -29,7 +29,8 @@ #include -static void dd(const char * fmt, ...) { +static ngx_inline void +dd(const char * fmt, ...) { } # endif @@ -46,7 +47,8 @@ static void dd(const char * fmt, ...) { #include -static void dd(const char * fmt, ...) { +static ngx_inline void +dd(const char * fmt, ...) { } # endif @@ -81,4 +83,3 @@ static void dd(const char * fmt, ...) { #endif #endif /* DDEBUG_H */ - diff --git a/src/ngx_http_rds_csv_output.c b/src/ngx_http_rds_csv_output.c index dbe110b..abb7db3 100644 --- a/src/ngx_http_rds_csv_output.c +++ b/src/ngx_http_rds_csv_output.c @@ -429,11 +429,13 @@ ngx_http_rds_csv_output_field(ngx_http_request_t *r, ngx_http_rds_csv_escape_csv_str(sep, last, data, len, NULL); +#if DDEBUG dd("escaped value \"%.*s\" (len %d, escape %d, escape2 %d)", (int) (len + val_escape), p, (int) (len + val_escape), (int) val_escape, (int) ((last - p) - len)); +#endif } if (need_quotes && ctx->field_data_rest == 0) { @@ -544,11 +546,13 @@ ngx_http_rds_csv_output_more_field_data(ngx_http_request_t *r, last = (u_char *) ngx_http_rds_csv_escape_csv_str(sep, last, data, len, NULL); +#if DDEBUG dd("escaped value \"%.*s\" (len %d, escape %d, escape2 %d)", (int) (len + escape), p, (int) (len + escape), (int) escape, (int) ((last - p) - len)); +#endif } if (ctx->field_data_rest == 0) {