HTTP_MODULES="$HTTP_MODULES $HTTP_STATIC_MODULE $HTTP_INDEX_MODULE"
-if [ $HTTP_REWRITE = YES ]; then
+if [ $HTTP_REWRITE = YES -a $USE_PCRE != DISABLED ]; then
USE_PCRE=YES
HTTP_MODULES="$HTTP_MODULES $HTTP_REWRITE_MODULE"
HTTP_SRCS="$HTTP_SRCS $HTTP_REWRITE_SRCS"
--with-cc=*) CC="$value" ;;
- --without-pcre) USE_PCRE=NO ;;
+ --without-pcre) USE_PCRE=DISABLED ;;
--with-pcre=*) PCRE="$value" ;;
--with-md5=*) MD5="$value" ;;
--with-zlib=*) ZLIB="$value" ;;
}
}
- /* create the tailer iovec and coalesce the neighbouring hunks */
+ if (file) {
+ /* create the tailer iovec and coalesce the neighbouring hunks */
- prev = NULL;
- iov = NULL;
+ prev = NULL;
+ iov = NULL;
- for ( /* void */; cl && trailer.nelts < IOV_MAX; cl = cl->next) {
- if (ngx_hunk_special(cl->hunk)) {
- continue;
- }
+ for ( /* void */; cl && trailer.nelts < IOV_MAX; cl = cl->next) {
+ if (ngx_hunk_special(cl->hunk)) {
+ continue;
+ }
- if (!ngx_hunk_in_memory_only(cl->hunk)) {
- break;
- }
+ if (!ngx_hunk_in_memory_only(cl->hunk)) {
+ break;
+ }
- if (prev == cl->hunk->pos) {
- iov->iov_len += cl->hunk->last - cl->hunk->pos;
+ if (prev == cl->hunk->pos) {
+ iov->iov_len += cl->hunk->last - cl->hunk->pos;
- } else {
- ngx_test_null(iov, ngx_push_array(&trailer), NGX_CHAIN_ERROR);
- iov->iov_base = cl->hunk->pos;
- iov->iov_len = cl->hunk->last - cl->hunk->pos;
- }
+ } else {
+ ngx_test_null(iov, ngx_push_array(&trailer),
+ NGX_CHAIN_ERROR);
+ iov->iov_base = cl->hunk->pos;
+ iov->iov_len = cl->hunk->last - cl->hunk->pos;
+ }
- prev = cl->hunk->last;
+ prev = cl->hunk->last;
+ }
}
/*