--with-extended-status support, part 1 - the API change

Grzegorz Nosek root at localdomain.pl
Sun Jun 29 21:39:41 MSD 2008


This commit does nothing useful but changes the definition of all
HTTP modules to include (optional) ->report_status hook. It will be
used later by the stub status module to append per-module status
reports to the default status message.
---
 auto/options                                       |    2 ++
 configure                                          |    4 ++++
 src/http/modules/ngx_http_access_module.c          |    4 +++-
 src/http/modules/ngx_http_addition_filter_module.c |    4 +++-
 src/http/modules/ngx_http_auth_basic_module.c      |    4 +++-
 src/http/modules/ngx_http_autoindex_module.c       |    4 +++-
 src/http/modules/ngx_http_browser_module.c         |    4 +++-
 src/http/modules/ngx_http_charset_filter_module.c  |    4 +++-
 src/http/modules/ngx_http_chunked_filter_module.c  |    4 +++-
 src/http/modules/ngx_http_dav_module.c             |    4 +++-
 src/http/modules/ngx_http_empty_gif_module.c       |    4 +++-
 src/http/modules/ngx_http_fastcgi_module.c         |    4 +++-
 src/http/modules/ngx_http_flv_module.c             |    4 +++-
 src/http/modules/ngx_http_geo_module.c             |    4 +++-
 src/http/modules/ngx_http_gzip_filter_module.c     |    4 +++-
 src/http/modules/ngx_http_gzip_static_module.c     |    4 +++-
 src/http/modules/ngx_http_headers_filter_module.c  |    4 +++-
 src/http/modules/ngx_http_index_module.c           |    4 +++-
 src/http/modules/ngx_http_limit_zone_module.c      |    4 +++-
 src/http/modules/ngx_http_log_module.c             |    4 +++-
 src/http/modules/ngx_http_map_module.c             |    4 +++-
 src/http/modules/ngx_http_memcached_module.c       |    4 +++-
 .../modules/ngx_http_not_modified_filter_module.c  |    4 +++-
 src/http/modules/ngx_http_proxy_module.c           |    4 +++-
 src/http/modules/ngx_http_range_filter_module.c    |    4 ++++
 src/http/modules/ngx_http_realip_module.c          |    4 +++-
 src/http/modules/ngx_http_referer_module.c         |    4 +++-
 src/http/modules/ngx_http_rewrite_module.c         |    4 +++-
 src/http/modules/ngx_http_ssi_filter_module.c      |    4 +++-
 src/http/modules/ngx_http_ssl_module.c             |    4 +++-
 src/http/modules/ngx_http_static_module.c          |    4 +++-
 src/http/modules/ngx_http_stub_status_module.c     |    4 +++-
 src/http/modules/ngx_http_sub_filter_module.c      |    4 +++-
 .../modules/ngx_http_upstream_ip_hash_module.c     |    4 +++-
 src/http/modules/ngx_http_userid_filter_module.c   |    4 +++-
 src/http/modules/perl/ngx_http_perl_module.c       |    4 +++-
 src/http/ngx_http_config.h                         |    9 +++++++++
 src/http/ngx_http_copy_filter_module.c             |    4 +++-
 src/http/ngx_http_core_module.c                    |    4 +++-
 src/http/ngx_http_header_filter_module.c           |    2 ++
 src/http/ngx_http_postpone_filter_module.c         |    4 +++-
 src/http/ngx_http_upstream.c                       |    4 +++-
 src/http/ngx_http_write_filter_module.c            |    2 ++
 43 files changed, 134 insertions(+), 37 deletions(-)

diff --git a/auto/options b/auto/options
index e00bf97..cd4046f 100644
--- a/auto/options
+++ b/auto/options
@@ -81,6 +81,7 @@ HTTP_UPSTREAM_IP_HASH=YES
 
 # STUB
 HTTP_STUB_STATUS=NO
+HTTP_EXTENDED_STATUS=NO
 
 MAIL=NO
 MAIL_SSL=NO
@@ -193,6 +194,7 @@ do
 
         # STUB
         --with-http_stub_status_module)  HTTP_STUB_STATUS=YES       ;;
+        --with-http-extended-status)     HTTP_EXTENDED_STATUS=YES   ;;
 
         --with-mail)                     MAIL=YES                   ;;
         --with-mail_ssl_module)          MAIL_SSL=YES               ;;
diff --git a/configure b/configure
index 00a7f48..672b46d 100755
--- a/configure
+++ b/configure
@@ -51,6 +51,10 @@ if [ "$NGX_PLATFORM" != win32 ]; then
     . auto/threads
 fi
 
+if [ $HTTP_EXTENDED_STATUS = YES ]; then
+    have=NGX_HTTP_EXTENDED_STATUS . auto/have
+fi
+
 . auto/modules
 . auto/lib/conf
 
diff --git a/src/http/modules/ngx_http_access_module.c b/src/http/modules/ngx_http_access_module.c
index 264423b..981cc57 100644
--- a/src/http/modules/ngx_http_access_module.c
+++ b/src/http/modules/ngx_http_access_module.c
@@ -66,7 +66,9 @@ static ngx_http_module_t  ngx_http_access_module_ctx = {
     NULL,                                  /* merge server configuration */
 
     ngx_http_access_create_loc_conf,       /* create location configuration */
-    ngx_http_access_merge_loc_conf         /* merge location configuration */
+    ngx_http_access_merge_loc_conf,        /* merge location configuration */
+
+    NGX_HTTP_NULL_STATUS
 };
 
 
diff --git a/src/http/modules/ngx_http_addition_filter_module.c b/src/http/modules/ngx_http_addition_filter_module.c
index 9480082..d50b52f 100644
--- a/src/http/modules/ngx_http_addition_filter_module.c
+++ b/src/http/modules/ngx_http_addition_filter_module.c
@@ -57,7 +57,9 @@ static ngx_http_module_t  ngx_http_addition_filter_module_ctx = {
     NULL,                                  /* merge server configuration */
 
     ngx_http_addition_create_conf,         /* create location configuration */
-    ngx_http_addition_merge_conf           /* merge location configuration */
+    ngx_http_addition_merge_conf,          /* merge location configuration */
+
+    NGX_HTTP_NULL_STATUS
 };
 
 
diff --git a/src/http/modules/ngx_http_auth_basic_module.c b/src/http/modules/ngx_http_auth_basic_module.c
index 41e53cd..ffdb3b1 100644
--- a/src/http/modules/ngx_http_auth_basic_module.c
+++ b/src/http/modules/ngx_http_auth_basic_module.c
@@ -71,7 +71,9 @@ static ngx_http_module_t  ngx_http_auth_basic_module_ctx = {
     NULL,                                  /* merge server configuration */
 
     ngx_http_auth_basic_create_loc_conf,   /* create location configuration */
-    ngx_http_auth_basic_merge_loc_conf     /* merge location configuration */
+    ngx_http_auth_basic_merge_loc_conf,    /* merge location configuration */
+
+    NGX_HTTP_NULL_STATUS
 };
 
 
diff --git a/src/http/modules/ngx_http_autoindex_module.c b/src/http/modules/ngx_http_autoindex_module.c
index f57fbc8..065963b 100644
--- a/src/http/modules/ngx_http_autoindex_module.c
+++ b/src/http/modules/ngx_http_autoindex_module.c
@@ -92,7 +92,9 @@ static ngx_http_module_t  ngx_http_autoindex_module_ctx = {
     NULL,                                  /* merge server configuration */
 
     ngx_http_autoindex_create_loc_conf,    /* create location configration */
-    ngx_http_autoindex_merge_loc_conf      /* merge location configration */
+    ngx_http_autoindex_merge_loc_conf,     /* merge location configration */
+
+    NGX_HTTP_NULL_STATUS
 };
 
 
diff --git a/src/http/modules/ngx_http_browser_module.c b/src/http/modules/ngx_http_browser_module.c
index 083375b..6d5f117 100644
--- a/src/http/modules/ngx_http_browser_module.c
+++ b/src/http/modules/ngx_http_browser_module.c
@@ -123,7 +123,9 @@ static ngx_http_module_t  ngx_http_browser_module_ctx = {
     NULL,                                  /* merge server configuration */
 
     ngx_http_browser_create_conf,          /* create location configuration */
-    ngx_http_browser_merge_conf            /* merge location configuration */
+    ngx_http_browser_merge_conf,           /* merge location configuration */
+
+    NGX_HTTP_NULL_STATUS
 };
 
 
diff --git a/src/http/modules/ngx_http_charset_filter_module.c b/src/http/modules/ngx_http_charset_filter_module.c
index 850e64e..6d0fb8c 100644
--- a/src/http/modules/ngx_http_charset_filter_module.c
+++ b/src/http/modules/ngx_http_charset_filter_module.c
@@ -158,7 +158,9 @@ static ngx_http_module_t  ngx_http_charset_filter_module_ctx = {
     NULL,                                  /* merge server configuration */
 
     ngx_http_charset_create_loc_conf,      /* create location configuration */
-    ngx_http_charset_merge_loc_conf        /* merge location configuration */
+    ngx_http_charset_merge_loc_conf,       /* merge location configuration */
+
+    NGX_HTTP_NULL_STATUS
 };
 
 
diff --git a/src/http/modules/ngx_http_chunked_filter_module.c b/src/http/modules/ngx_http_chunked_filter_module.c
index 3cc20eb..cec3082 100644
--- a/src/http/modules/ngx_http_chunked_filter_module.c
+++ b/src/http/modules/ngx_http_chunked_filter_module.c
@@ -23,7 +23,9 @@ static ngx_http_module_t  ngx_http_chunked_filter_module_ctx = {
     NULL,                                  /* merge server configuration */
 
     NULL,                                  /* create location configuration */
-    NULL                                   /* merge location configuration */
+    NULL,                                  /* merge location configuration */
+
+    NGX_HTTP_NULL_STATUS
 };
 
 
diff --git a/src/http/modules/ngx_http_dav_module.c b/src/http/modules/ngx_http_dav_module.c
index b1e0831..83a1916 100644
--- a/src/http/modules/ngx_http_dav_module.c
+++ b/src/http/modules/ngx_http_dav_module.c
@@ -122,7 +122,9 @@ static ngx_http_module_t  ngx_http_dav_module_ctx = {
     NULL,                                  /* merge server configuration */
 
     ngx_http_dav_create_loc_conf,          /* create location configuration */
-    ngx_http_dav_merge_loc_conf            /* merge location configuration */
+    ngx_http_dav_merge_loc_conf,           /* merge location configuration */
+
+    NGX_HTTP_NULL_STATUS
 };
 
 
diff --git a/src/http/modules/ngx_http_empty_gif_module.c b/src/http/modules/ngx_http_empty_gif_module.c
index 8450cae..8805ae4 100644
--- a/src/http/modules/ngx_http_empty_gif_module.c
+++ b/src/http/modules/ngx_http_empty_gif_module.c
@@ -85,7 +85,9 @@ static ngx_http_module_t  ngx_http_empty_gif_module_ctx = {
     NULL,                          /* merge server configuration */
 
     NULL,                          /* create location configuration */
-    NULL                           /* merge location configuration */
+    NULL,                          /* merge location configuration */
+
+    NGX_HTTP_NULL_STATUS
 };
 
 
diff --git a/src/http/modules/ngx_http_fastcgi_module.c b/src/http/modules/ngx_http_fastcgi_module.c
index 17e8a3d..5fb86ab 100644
--- a/src/http/modules/ngx_http_fastcgi_module.c
+++ b/src/http/modules/ngx_http_fastcgi_module.c
@@ -365,7 +365,9 @@ static ngx_http_module_t  ngx_http_fastcgi_module_ctx = {
     NULL,                                  /* merge server configuration */
 
     ngx_http_fastcgi_create_loc_conf,      /* create location configuration */
-    ngx_http_fastcgi_merge_loc_conf        /* merge location configuration */
+    ngx_http_fastcgi_merge_loc_conf,       /* merge location configuration */
+
+    NGX_HTTP_NULL_STATUS
 };
 
 
diff --git a/src/http/modules/ngx_http_flv_module.c b/src/http/modules/ngx_http_flv_module.c
index 0e19091..0247097 100644
--- a/src/http/modules/ngx_http_flv_module.c
+++ b/src/http/modules/ngx_http_flv_module.c
@@ -37,7 +37,9 @@ static ngx_http_module_t  ngx_http_flv_module_ctx = {
     NULL,                          /* merge server configuration */
 
     NULL,                          /* create location configuration */
-    NULL                           /* merge location configuration */
+    NULL,                          /* merge location configuration */
+
+    NGX_HTTP_NULL_STATUS
 };
 
 
diff --git a/src/http/modules/ngx_http_geo_module.c b/src/http/modules/ngx_http_geo_module.c
index 37be887..22be83f 100644
--- a/src/http/modules/ngx_http_geo_module.c
+++ b/src/http/modules/ngx_http_geo_module.c
@@ -44,7 +44,9 @@ static ngx_http_module_t  ngx_http_geo_module_ctx = {
     NULL,                                  /* merge server configuration */
 
     NULL,                                  /* create location configuration */
-    NULL                                   /* merge location configuration */
+    NULL,                                  /* merge location configuration */
+
+    NGX_HTTP_NULL_STATUS
 };
 
 
diff --git a/src/http/modules/ngx_http_gzip_filter_module.c b/src/http/modules/ngx_http_gzip_filter_module.c
index 1587c00..41f3d1d 100644
--- a/src/http/modules/ngx_http_gzip_filter_module.c
+++ b/src/http/modules/ngx_http_gzip_filter_module.c
@@ -156,7 +156,9 @@ static ngx_http_module_t  ngx_http_gzip_filter_module_ctx = {
     NULL,                                  /* merge server configuration */
 
     ngx_http_gzip_create_conf,             /* create location configuration */
-    ngx_http_gzip_merge_conf               /* merge location configuration */
+    ngx_http_gzip_merge_conf,              /* merge location configuration */
+
+    NGX_HTTP_NULL_STATUS
 };
 
 
diff --git a/src/http/modules/ngx_http_gzip_static_module.c b/src/http/modules/ngx_http_gzip_static_module.c
index c373649..e92b7a0 100644
--- a/src/http/modules/ngx_http_gzip_static_module.c
+++ b/src/http/modules/ngx_http_gzip_static_module.c
@@ -45,7 +45,9 @@ ngx_http_module_t  ngx_http_gzip_static_module_ctx = {
     NULL,                                  /* merge server configuration */
 
     ngx_http_gzip_static_create_conf,      /* create location configuration */
-    ngx_http_gzip_static_merge_conf        /* merge location configuration */
+    ngx_http_gzip_static_merge_conf,       /* merge location configuration */
+
+    NGX_HTTP_NULL_STATUS
 };
 
 
diff --git a/src/http/modules/ngx_http_headers_filter_module.c b/src/http/modules/ngx_http_headers_filter_module.c
index 06c91bc..cfa5835 100644
--- a/src/http/modules/ngx_http_headers_filter_module.c
+++ b/src/http/modules/ngx_http_headers_filter_module.c
@@ -105,7 +105,9 @@ static ngx_http_module_t  ngx_http_headers_filter_module_ctx = {
     NULL,                                  /* merge server configuration */
 
     ngx_http_headers_create_conf,          /* create location configuration */
-    ngx_http_headers_merge_conf            /* merge location configuration */
+    ngx_http_headers_merge_conf,           /* merge location configuration */
+
+    NGX_HTTP_NULL_STATUS
 };
 
 
diff --git a/src/http/modules/ngx_http_index_module.c b/src/http/modules/ngx_http_index_module.c
index 6bfb045..be3b063 100644
--- a/src/http/modules/ngx_http_index_module.c
+++ b/src/http/modules/ngx_http_index_module.c
@@ -62,7 +62,9 @@ static ngx_http_module_t  ngx_http_index_module_ctx = {
     NULL,                                  /* merge server configuration */
 
     ngx_http_index_create_loc_conf,        /* create location configration */
-    ngx_http_index_merge_loc_conf          /* merge location configration */
+    ngx_http_index_merge_loc_conf,         /* merge location configration */
+
+    NGX_HTTP_NULL_STATUS
 };
 
 
diff --git a/src/http/modules/ngx_http_limit_zone_module.c b/src/http/modules/ngx_http_limit_zone_module.c
index c7a3753..3b9e424 100644
--- a/src/http/modules/ngx_http_limit_zone_module.c
+++ b/src/http/modules/ngx_http_limit_zone_module.c
@@ -79,7 +79,9 @@ static ngx_http_module_t  ngx_http_limit_zone_module_ctx = {
     NULL,                                  /* merge server configuration */
 
     ngx_http_limit_zone_create_conf,       /* create location configration */
-    ngx_http_limit_zone_merge_conf         /* merge location configration */
+    ngx_http_limit_zone_merge_conf,        /* merge location configration */
+
+    NGX_HTTP_NULL_STATUS
 };
 
 
diff --git a/src/http/modules/ngx_http_log_module.c b/src/http/modules/ngx_http_log_module.c
index 157b15c..fa538d0 100644
--- a/src/http/modules/ngx_http_log_module.c
+++ b/src/http/modules/ngx_http_log_module.c
@@ -135,7 +135,9 @@ static ngx_http_module_t  ngx_http_log_module_ctx = {
     NULL,                                  /* merge server configuration */
 
     ngx_http_log_create_loc_conf,          /* create location configration */
-    ngx_http_log_merge_loc_conf            /* merge location configration */
+    ngx_http_log_merge_loc_conf,           /* merge location configration */
+
+    NGX_HTTP_NULL_STATUS
 };
 
 
diff --git a/src/http/modules/ngx_http_map_module.c b/src/http/modules/ngx_http_map_module.c
index c1d87c1..1eda16f 100644
--- a/src/http/modules/ngx_http_map_module.c
+++ b/src/http/modules/ngx_http_map_module.c
@@ -78,7 +78,9 @@ static ngx_http_module_t  ngx_http_map_module_ctx = {
     NULL,                                  /* merge server configuration */
 
     NULL,                                  /* create location configuration */
-    NULL                                   /* merge location configuration */
+    NULL,                                  /* merge location configuration */
+
+    NGX_HTTP_NULL_STATUS
 };
 
 
diff --git a/src/http/modules/ngx_http_memcached_module.c b/src/http/modules/ngx_http_memcached_module.c
index 64592f3..4fc8000 100644
--- a/src/http/modules/ngx_http_memcached_module.c
+++ b/src/http/modules/ngx_http_memcached_module.c
@@ -128,7 +128,9 @@ static ngx_http_module_t  ngx_http_memcached_module_ctx = {
     NULL,                                  /* merge server configuration */
 
     ngx_http_memcached_create_loc_conf,    /* create location configration */
-    ngx_http_memcached_merge_loc_conf      /* merge location configration */
+    ngx_http_memcached_merge_loc_conf,     /* merge location configration */
+
+    NGX_HTTP_NULL_STATUS
 };
 
 
diff --git a/src/http/modules/ngx_http_not_modified_filter_module.c b/src/http/modules/ngx_http_not_modified_filter_module.c
index ce4b55c..6d4205e 100644
--- a/src/http/modules/ngx_http_not_modified_filter_module.c
+++ b/src/http/modules/ngx_http_not_modified_filter_module.c
@@ -24,7 +24,9 @@ static ngx_http_module_t  ngx_http_not_modified_filter_module_ctx = {
     NULL,                                  /* merge server configuration */
 
     NULL,                                  /* create location configuration */
-    NULL                                   /* merge location configuration */
+    NULL,                                  /* merge location configuration */
+
+    NGX_HTTP_NULL_STATUS
 };
 
 
diff --git a/src/http/modules/ngx_http_proxy_module.c b/src/http/modules/ngx_http_proxy_module.c
index c559d31..75bbe2a 100644
--- a/src/http/modules/ngx_http_proxy_module.c
+++ b/src/http/modules/ngx_http_proxy_module.c
@@ -397,7 +397,9 @@ static ngx_http_module_t  ngx_http_proxy_module_ctx = {
     NULL,                                  /* merge server configuration */
 
     ngx_http_proxy_create_loc_conf,        /* create location configration */
-    ngx_http_proxy_merge_loc_conf          /* merge location configration */
+    ngx_http_proxy_merge_loc_conf,         /* merge location configration */
+
+    NGX_HTTP_NULL_STATUS
 };
 
 
diff --git a/src/http/modules/ngx_http_range_filter_module.c b/src/http/modules/ngx_http_range_filter_module.c
index cf42daf..122891c 100644
--- a/src/http/modules/ngx_http_range_filter_module.c
+++ b/src/http/modules/ngx_http_range_filter_module.c
@@ -74,6 +74,8 @@ static ngx_http_module_t  ngx_http_range_header_filter_module_ctx = {
 
     NULL,                                  /* create location configuration */
     NULL,                                  /* merge location configuration */
+
+    NGX_HTTP_NULL_STATUS
 };
 
 
@@ -105,6 +107,8 @@ static ngx_http_module_t  ngx_http_range_body_filter_module_ctx = {
 
     NULL,                                  /* create location configuration */
     NULL,                                  /* merge location configuration */
+
+    NGX_HTTP_NULL_STATUS
 };
 
 
diff --git a/src/http/modules/ngx_http_realip_module.c b/src/http/modules/ngx_http_realip_module.c
index 4de4c13..7f2b66c 100644
--- a/src/http/modules/ngx_http_realip_module.c
+++ b/src/http/modules/ngx_http_realip_module.c
@@ -72,7 +72,9 @@ static ngx_http_module_t  ngx_http_realip_module_ctx = {
     NULL,                                  /* merge server configuration */
 
     ngx_http_realip_create_loc_conf,       /* create location configuration */
-    ngx_http_realip_merge_loc_conf         /* merge location configuration */
+    ngx_http_realip_merge_loc_conf,        /* merge location configuration */
+
+    NGX_HTTP_NULL_STATUS
 };
 
 
diff --git a/src/http/modules/ngx_http_referer_module.c b/src/http/modules/ngx_http_referer_module.c
index 0582899..4f039a8 100644
--- a/src/http/modules/ngx_http_referer_module.c
+++ b/src/http/modules/ngx_http_referer_module.c
@@ -69,7 +69,9 @@ static ngx_http_module_t  ngx_http_referer_module_ctx = {
     NULL,                                  /* merge server configuration */
 
     ngx_http_referer_create_conf,          /* create location configuration */
-    ngx_http_referer_merge_conf            /* merge location configuration */
+    ngx_http_referer_merge_conf,           /* merge location configuration */
+
+    NGX_HTTP_NULL_STATUS
 };
 
 
diff --git a/src/http/modules/ngx_http_rewrite_module.c b/src/http/modules/ngx_http_rewrite_module.c
index 341e054..8663827 100644
--- a/src/http/modules/ngx_http_rewrite_module.c
+++ b/src/http/modules/ngx_http_rewrite_module.c
@@ -113,7 +113,9 @@ static ngx_http_module_t  ngx_http_rewrite_module_ctx = {
     NULL,                                  /* merge server configuration */
 
     ngx_http_rewrite_create_loc_conf,      /* create location configration */
-    ngx_http_rewrite_merge_loc_conf        /* merge location configration */
+    ngx_http_rewrite_merge_loc_conf,       /* merge location configration */
+
+    NGX_HTTP_NULL_STATUS
 };
 
 
diff --git a/src/http/modules/ngx_http_ssi_filter_module.c b/src/http/modules/ngx_http_ssi_filter_module.c
index 1d7730d..e0c957f 100644
--- a/src/http/modules/ngx_http_ssi_filter_module.c
+++ b/src/http/modules/ngx_http_ssi_filter_module.c
@@ -174,7 +174,9 @@ static ngx_http_module_t  ngx_http_ssi_filter_module_ctx = {
     NULL,                                  /* merge server configuration */
 
     ngx_http_ssi_create_loc_conf,          /* create location configuration */
-    ngx_http_ssi_merge_loc_conf            /* merge location configuration */
+    ngx_http_ssi_merge_loc_conf,           /* merge location configuration */
+
+    NGX_HTTP_NULL_STATUS
 };
 
 
diff --git a/src/http/modules/ngx_http_ssl_module.c b/src/http/modules/ngx_http_ssl_module.c
index 3359900..805a703 100644
--- a/src/http/modules/ngx_http_ssl_module.c
+++ b/src/http/modules/ngx_http_ssl_module.c
@@ -147,7 +147,9 @@ static ngx_http_module_t  ngx_http_ssl_module_ctx = {
     ngx_http_ssl_merge_srv_conf,           /* merge server configuration */
 
     NULL,                                  /* create location configuration */
-    NULL                                   /* merge location configuration */
+    NULL,                                  /* merge location configuration */
+
+    NGX_HTTP_NULL_STATUS
 };
 
 
diff --git a/src/http/modules/ngx_http_static_module.c b/src/http/modules/ngx_http_static_module.c
index c4e688f..536eae7 100644
--- a/src/http/modules/ngx_http_static_module.c
+++ b/src/http/modules/ngx_http_static_module.c
@@ -24,7 +24,9 @@ ngx_http_module_t  ngx_http_static_module_ctx = {
     NULL,                                  /* merge server configuration */
 
     NULL,                                  /* create location configuration */
-    NULL                                   /* merge location configuration */
+    NULL,                                  /* merge location configuration */
+
+    NGX_HTTP_NULL_STATUS
 };
 
 
diff --git a/src/http/modules/ngx_http_stub_status_module.c b/src/http/modules/ngx_http_stub_status_module.c
index 9d2d074..cc1fd51 100644
--- a/src/http/modules/ngx_http_stub_status_module.c
+++ b/src/http/modules/ngx_http_stub_status_module.c
@@ -37,7 +37,9 @@ static ngx_http_module_t  ngx_http_stub_status_module_ctx = {
     NULL,                                  /* merge server configuration */
 
     NULL,                                  /* create location configuration */
-    NULL                                   /* merge location configuration */
+    NULL,                                  /* merge location configuration */
+
+    NGX_HTTP_NULL_STATUS
 };
 
 
diff --git a/src/http/modules/ngx_http_sub_filter_module.c b/src/http/modules/ngx_http_sub_filter_module.c
index 663a9f5..8575347 100644
--- a/src/http/modules/ngx_http_sub_filter_module.c
+++ b/src/http/modules/ngx_http_sub_filter_module.c
@@ -105,7 +105,9 @@ static ngx_http_module_t  ngx_http_sub_filter_module_ctx = {
     NULL,                                  /* merge server configuration */
 
     ngx_http_sub_create_conf,              /* create location configuration */
-    ngx_http_sub_merge_conf                /* merge location configuration */
+    ngx_http_sub_merge_conf,               /* merge location configuration */
+
+    NGX_HTTP_NULL_STATUS
 };
 
 
diff --git a/src/http/modules/ngx_http_upstream_ip_hash_module.c b/src/http/modules/ngx_http_upstream_ip_hash_module.c
index 1d13481..7c61584 100644
--- a/src/http/modules/ngx_http_upstream_ip_hash_module.c
+++ b/src/http/modules/ngx_http_upstream_ip_hash_module.c
@@ -56,7 +56,9 @@ static ngx_http_module_t  ngx_http_upstream_ip_hash_module_ctx = {
     NULL,                                  /* merge server configuration */
 
     NULL,                                  /* create location configuration */
-    NULL                                   /* merge location configuration */
+    NULL,                                  /* merge location configuration */
+
+    NGX_HTTP_NULL_STATUS
 };
 
 
diff --git a/src/http/modules/ngx_http_userid_filter_module.c b/src/http/modules/ngx_http_userid_filter_module.c
index 98cff7e..5980bf3 100644
--- a/src/http/modules/ngx_http_userid_filter_module.c
+++ b/src/http/modules/ngx_http_userid_filter_module.c
@@ -164,7 +164,9 @@ static ngx_http_module_t  ngx_http_userid_filter_module_ctx = {
     NULL,                                  /* merge server configuration */
 
     ngx_http_userid_create_conf,           /* create location configration */
-    ngx_http_userid_merge_conf             /* merge location configration */
+    ngx_http_userid_merge_conf,            /* merge location configration */
+
+    NGX_HTTP_NULL_STATUS
 };
 
 
diff --git a/src/http/modules/perl/ngx_http_perl_module.c b/src/http/modules/perl/ngx_http_perl_module.c
index ab89cad..b6af377 100644
--- a/src/http/modules/perl/ngx_http_perl_module.c
+++ b/src/http/modules/perl/ngx_http_perl_module.c
@@ -115,7 +115,9 @@ static ngx_http_module_t  ngx_http_perl_module_ctx = {
     NULL,                                  /* merge server configuration */
 
     ngx_http_perl_create_loc_conf,         /* create location configuration */
-    ngx_http_perl_merge_loc_conf           /* merge location configuration */
+    ngx_http_perl_merge_loc_conf,          /* merge location configuration */
+
+    NGX_HTTP_NULL_STATUS
 };
 
 
diff --git a/src/http/ngx_http_config.h b/src/http/ngx_http_config.h
index 6629210..b4e7460 100644
--- a/src/http/ngx_http_config.h
+++ b/src/http/ngx_http_config.h
@@ -32,8 +32,17 @@ typedef struct {
 
     void       *(*create_loc_conf)(ngx_conf_t *cf);
     char       *(*merge_loc_conf)(ngx_conf_t *cf, void *prev, void *conf);
+
+#if (NGX_HTTP_EXTENDED_STATUS)
+    ngx_chain_t *(*report_status)(ngx_http_request_t *r, ngx_int_t *length);
+#endif
 } ngx_http_module_t;
 
+#if (NGX_HTTP_EXTENDED_STATUS)
+#define NGX_HTTP_NULL_STATUS      NULL
+#else
+#define NGX_HTTP_NULL_STATUS
+#endif
 
 #define NGX_HTTP_MODULE           0x50545448   /* "HTTP" */
 
diff --git a/src/http/ngx_http_copy_filter_module.c b/src/http/ngx_http_copy_filter_module.c
index 3b1a3a7..00abccf 100644
--- a/src/http/ngx_http_copy_filter_module.c
+++ b/src/http/ngx_http_copy_filter_module.c
@@ -44,7 +44,9 @@ static ngx_http_module_t  ngx_http_copy_filter_module_ctx = {
     NULL,                                  /* merge server configuration */
 
     ngx_http_copy_filter_create_conf,      /* create location configuration */
-    ngx_http_copy_filter_merge_conf        /* merge location configuration */
+    ngx_http_copy_filter_merge_conf,       /* merge location configuration */
+
+    NGX_HTTP_NULL_STATUS
 };
 
 
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
index f57db36..5e49b8a 100644
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -633,7 +633,9 @@ static ngx_http_module_t  ngx_http_core_module_ctx = {
     ngx_http_core_merge_srv_conf,          /* merge server configuration */
 
     ngx_http_core_create_loc_conf,         /* create location configuration */
-    ngx_http_core_merge_loc_conf           /* merge location configuration */
+    ngx_http_core_merge_loc_conf,          /* merge location configuration */
+
+    NGX_HTTP_NULL_STATUS
 };
 
 
diff --git a/src/http/ngx_http_header_filter_module.c b/src/http/ngx_http_header_filter_module.c
index 9cdac61..04c397b 100644
--- a/src/http/ngx_http_header_filter_module.c
+++ b/src/http/ngx_http_header_filter_module.c
@@ -26,6 +26,8 @@ static ngx_http_module_t  ngx_http_header_filter_module_ctx = {
 
     NULL,                                  /* create location configuration */
     NULL,                                  /* merge location configuration */
+
+    NGX_HTTP_NULL_STATUS
 };
 
 
diff --git a/src/http/ngx_http_postpone_filter_module.c b/src/http/ngx_http_postpone_filter_module.c
index 3262166..5d712f8 100644
--- a/src/http/ngx_http_postpone_filter_module.c
+++ b/src/http/ngx_http_postpone_filter_module.c
@@ -25,7 +25,9 @@ static ngx_http_module_t  ngx_http_postpone_filter_module_ctx = {
     NULL,                                  /* merge server configuration */
 
     NULL,                                  /* create location configuration */
-    NULL                                   /* merge location configuration */
+    NULL,                                  /* merge location configuration */
+
+    NGX_HTTP_NULL_STATUS
 };
 
 
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c
index 9ec861c..1c18213 100644
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -246,7 +246,9 @@ static ngx_http_module_t  ngx_http_upstream_module_ctx = {
     NULL,                                  /* merge server configuration */
 
     NULL,                                  /* create location configuration */
-    NULL                                   /* merge location configuration */
+    NULL,                                  /* merge location configuration */
+
+    NGX_HTTP_NULL_STATUS
 };
 
 
diff --git a/src/http/ngx_http_write_filter_module.c b/src/http/ngx_http_write_filter_module.c
index bc62b18..a0b3ccd 100644
--- a/src/http/ngx_http_write_filter_module.c
+++ b/src/http/ngx_http_write_filter_module.c
@@ -25,6 +25,8 @@ static ngx_http_module_t  ngx_http_write_filter_module_ctx = {
 
     NULL,                                  /* create location configuration */
     NULL,                                  /* merge location configuration */
+
+    NGX_HTTP_NULL_STATUS
 };
 
 
-- 
1.5.4.4


--xHFwDpU9dbj6ez1V
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment; filename="0002-Support-extended-status-reports-in-stub_status-modul.patch"



More information about the nginx mailing list