Browse files

fixed compatibility issues with nginx 1.1.4+.

  • Loading branch information...
1 parent 3564332 commit 1065c3f85381b48528d9dc319fef50759773b7fd @agentzh agentzh committed Oct 9, 2011
Showing with 15 additions and 1 deletion.
  1. +7 −0 README
  2. +5 −0 src/ngx_http_rds_csv_output.c
  3. +2 −0 src/ngx_http_rds_csv_util.c
  4. +1 −1 t/sanity-stream.t
View
7 README
@@ -78,6 +78,13 @@ Directives
The lager this buffer size setting, the less streammy the output
will be.
+Compatibility
+
+ This module is compatible with the following versions of Nginx:
+
+ * 1.1.x (last tested: 1.1.5)
+ * 1.0.x (last tested: 1.0.8)
+
Author
Zhang "agentzh" Yichun <agentzh@gmail.com>
View
5 src/ngx_http_rds_csv_output.c
@@ -97,8 +97,13 @@ ngx_http_rds_csv_output_bufs(ngx_http_request_t *r,
return rc;
}
+#if defined(nginx_version) && nginx_version >= 1001004
+ ngx_chain_update_chains(r->pool, &ctx->free_bufs, &ctx->busy_bufs,
+ &ctx->out, ctx->tag);
+#else
ngx_chain_update_chains(&ctx->free_bufs, &ctx->busy_bufs, &ctx->out,
ctx->tag);
+#endif
ctx->last_out = &ctx->out;
}
View
2 src/ngx_http_rds_csv_util.c
@@ -1,4 +1,6 @@
+#ifndef DDEBUG
#define DDEBUG 0
+#endif
#include "ddebug.h"
#include "resty_dbd_stream.h"
View
2 t/sanity-stream.t
@@ -20,7 +20,7 @@ our $http_config = <<'_EOC_';
_EOC_
no_long_string();
-no_diff();
+#no_diff();
run_tests();

0 comments on commit 1065c3f

Please sign in to comment.