diff --git a/auto/modules b/auto/modules index 68d6eed05..a2dccc88e 100644 --- a/auto/modules +++ b/auto/modules @@ -43,16 +43,12 @@ fi HTTP_FILTER_MODULES="$HTTP_FILTER_MODULES \ $HTTP_CHUNKED_FILTER_MODULE \ - $HTTP_RANGE_HEADER_FILTER_MODULE \ - $HTTP_CHARSET_FILTER_MODULE" + $HTTP_RANGE_HEADER_FILTER_MODULE" -HTTP_MODULES="$HTTP_MODULES $HTTP_STATIC_MODULE $HTTP_INDEX_MODULE" - -if [ $HTTP_REWRITE = YES -a $USE_PCRE != DISABLED ]; then - have=NGX_HTTP_REWRITE . auto/have - USE_PCRE=YES - HTTP_MODULES="$HTTP_MODULES $HTTP_REWRITE_MODULE" - HTTP_SRCS="$HTTP_SRCS $HTTP_REWRITE_SRCS" +if [ $HTTP_CHARSET = YES ]; then + have=NGX_HTTP_CHARSET . auto/have + HTTP_FILTER_MODULES="$HTTP_FILTER_MODULES $HTTP_CHARSET_FILTER_MODULE" + HTTP_SRCS="$HTTP_SRCS $HTTP_CHARSET_SRCS" fi if [ $HTTP_GZIP = YES ]; then @@ -68,6 +64,15 @@ if [ $HTTP_SSI = YES ]; then HTTP_SRCS="$HTTP_SRCS $HTTP_SSI_SRCS" fi +HTTP_MODULES="$HTTP_MODULES $HTTP_STATIC_MODULE $HTTP_INDEX_MODULE" + +if [ $HTTP_REWRITE = YES -a $USE_PCRE != DISABLED ]; then + have=NGX_HTTP_REWRITE . auto/have + USE_PCRE=YES + HTTP_MODULES="$HTTP_MODULES $HTTP_REWRITE_MODULE" + HTTP_SRCS="$HTTP_SRCS $HTTP_REWRITE_SRCS" +fi + if [ $HTTP_PROXY = YES ]; then have=NGX_HTTP_PROXY . auto/have USE_MD5=YES diff --git a/auto/options b/auto/options index 8ef6dddbb..7c729d866 100644 --- a/auto/options +++ b/auto/options @@ -29,6 +29,7 @@ EVENT_AIO=NO USE_THREADS=NO +HTTP_CHARSET=YES HTTP_REWRITE=YES HTTP_GZIP=YES HTTP_SSI=YES @@ -80,6 +81,7 @@ do --with-threads=*) USE_THREADS="$value" ;; --with-threads) USE_THREADS="pthreads" ;; + --without-http_charset_module) HTTP_CHARSET=NO ;; --without-http_rewrite_module) HTTP_REWRITE=NO ;; --without-http_ssi_module) HTTP_SSI=NO ;; --without-http_gzip_module) HTTP_GZIP=NO ;; diff --git a/auto/sources b/auto/sources index ba2934a44..a74e28615 100644 --- a/auto/sources +++ b/auto/sources @@ -187,7 +187,6 @@ HTTP_FILTER_MODULES="ngx_http_write_filter_module \ ngx_http_header_filter_module" HTTP_CHUNKED_FILTER_MODULE=ngx_http_chunked_filter_module -HTTP_CHARSET_FILTER_MODULE=ngx_http_charset_filter_module HTTP_HEADERS_FILTER_MODULE=ngx_http_headers_filter_module HTTP_COPY_FILTER_MODULE=ngx_http_copy_filter_module @@ -225,7 +224,6 @@ HTTP_SRCS="src/http/ngx_http.c \ src/http/modules/ngx_http_index_handler.c \ src/http/modules/ngx_http_chunked_filter.c \ src/http/modules/ngx_http_range_filter.c \ - src/http/modules/ngx_http_charset_filter.c \ src/http/modules/ngx_http_headers_filter.c \ src/http/modules/ngx_http_not_modified_filter.c" @@ -236,6 +234,10 @@ HTPP_CACHE_SRCS=src/http/ngx_http_cache.c HTPP_FILE_CACHE_SRCS=src/http/ngx_http_file_cache.c +HTTP_CHARSET_FILTER_MODULE=ngx_http_charset_filter_module +HTTP_CHARSET_FILTER_SRCS=src/http/modules/ngx_http_charset_filter.c + + HTTP_REWRITE_MODULE=ngx_http_rewrite_module HTTP_REWRITE_SRCS=src/http/modules/ngx_http_rewrite_handler.c diff --git a/src/event/modules/ngx_devpoll_module.c b/src/event/modules/ngx_devpoll_module.c index 52caaf037..7e272ff8d 100644 --- a/src/event/modules/ngx_devpoll_module.c +++ b/src/event/modules/ngx_devpoll_module.c @@ -245,6 +245,10 @@ static int ngx_devpoll_del_event(ngx_event_t *ev, int event, u_int flags) /* we need to restore the second event if it exists */ if (event == NGX_READ_EVENT) { + if (ev->accept) { + return NGX_OK; + } + e = c->write; event = POLLOUT;