Skip to content
Browse files

bugfix: made DDEBUG defineable from outside.

  • Loading branch information...
1 parent 57e2119 commit beddbe14a89c092a1af89e8bfbe09f1923f56087 @agentzh agentzh committed
Showing with 15 additions and 8 deletions.
  1. +2 −0 src/ngx_http_xss_filter_module.c
  2. +10 −8 src/ngx_http_xss_util.c
  3. +2 −0 src/ngx_http_xss_util.rl
  4. +1 −0 util/build.sh
View
2 src/ngx_http_xss_filter_module.c
@@ -2,7 +2,9 @@
* Copyright (C) agentzh
*/
+#ifndef DDEBUG
#define DDEBUG 0
+#endif
#include "ddebug.h"
View
18 src/ngx_http_xss_util.c
@@ -1,14 +1,16 @@
#line 1 "src/ngx_http_xss_util.rl"
+#ifndef DDEBUG
#define DDEBUG 0
+#endif
#include "ddebug.h"
#include "ngx_http_xss_util.h"
-#line 7 "src/ngx_http_xss_util.rl"
+#line 9 "src/ngx_http_xss_util.rl"
-#line 12 "src/ngx_http_xss_util.c"
+#line 14 "src/ngx_http_xss_util.c"
static const int javascript_start = 1;
static const int javascript_first_final = 6;
static const int javascript_error = 0;
@@ -16,7 +18,7 @@ static const int javascript_error = 0;
static const int javascript_en_main = 1;
-#line 8 "src/ngx_http_xss_util.rl"
+#line 10 "src/ngx_http_xss_util.rl"
ngx_int_t ngx_http_xss_test_callback(u_char *data, size_t len)
{
@@ -27,12 +29,12 @@ ngx_int_t ngx_http_xss_test_callback(u_char *data, size_t len)
pe = p + len;
-#line 31 "src/ngx_http_xss_util.c"
+#line 33 "src/ngx_http_xss_util.c"
{
cs = javascript_start;
}
-#line 36 "src/ngx_http_xss_util.c"
+#line 38 "src/ngx_http_xss_util.c"
{
if ( p == pe )
goto _test_eof;
@@ -128,13 +130,13 @@ case 5:
_out: {}
}
-#line 29 "src/ngx_http_xss_util.rl"
+#line 31 "src/ngx_http_xss_util.rl"
if (cs <
-#line 136 "src/ngx_http_xss_util.c"
+#line 138 "src/ngx_http_xss_util.c"
6
-#line 31 "src/ngx_http_xss_util.rl"
+#line 33 "src/ngx_http_xss_util.rl"
|| p != pe) {
return NGX_DECLINED;
}
View
2 src/ngx_http_xss_util.rl
@@ -1,4 +1,6 @@
+#ifndef DDEBUG
#define DDEBUG 0
+#endif
#include "ddebug.h"
#include "ngx_http_xss_util.h"
View
1 util/build.sh
@@ -15,6 +15,7 @@ force=$2
ngx-build $force $version \
--with-cc-opt="-O3 -funsigned-char" \
+ --with-http_ssl_module \
--without-mail_pop3_module \
--without-mail_imap_module \
--without-mail_smtp_module \

0 comments on commit beddbe1

Please sign in to comment.
Something went wrong with that request. Please try again.