Browse files

now we report an error at config time if used with nginx 0.8.42 ~ 0.8…

….53.
  • Loading branch information...
1 parent c4488d4 commit 2fc79cb0940ef49bde7f47a7567f2aa26215080b @agentzh agentzh committed Feb 5, 2011
Showing with 6 additions and 0 deletions.
  1. +6 −0 ngx_http_eval_module.c
View
6 ngx_http_eval_module.c
@@ -6,6 +6,8 @@
#define DDEBUG 0
#include "ddebug.h"
+
+#include <nginx.h>
#include <ngx_config.h>
#include <ngx_core.h>
#include <ngx_http.h>
@@ -658,6 +660,10 @@ ngx_http_eval_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
ngx_http_core_loc_conf_t *clcf, *pclcf, *rclcf;
ngx_http_core_srv_conf_t *cscf;
+#if defined(nginx_version) && nginx_version >= 8042 && nginx_version <= 8053
+ return "does not work with " NGINX_VER;
+#endif
+
if(ngx_http_eval_add_variables(cf, cmd, conf) != NGX_CONF_OK) {
return NGX_CONF_ERROR;
}

0 comments on commit 2fc79cb

Please sign in to comment.