]> git.kaiwu.me - nginx.git/commitdiff
nginx-0.0.2-2004-02-19-19:48:14 import
authorIgor Sysoev <igor@sysoev.ru>
Thu, 19 Feb 2004 16:48:14 +0000 (16:48 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Thu, 19 Feb 2004 16:48:14 +0000 (16:48 +0000)
auto/modules
auto/options
src/os/unix/ngx_freebsd_sendfile_chain.c

index 6a1db63dccc8f1a4469472d7e13ac7c74dee861f..1af94969c56edf90863cdd7b1133739afca1bb02 100644 (file)
@@ -54,7 +54,7 @@ HTTP_FILTER_MODULES="$HTTP_FILTER_MODULES \
 
 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"
index d1996142ac5fa022148b8ab4c7688b7a1ec62717..c912119c62fd339e5437ee02d7ccdd4eb00a5ce7 100644 (file)
@@ -58,7 +58,7 @@ do
 
         --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"              ;;
index d5e1831bcf18a94b845fbb1d7585b8b6a50281d1..00236fa1153f2aa210e88907aa476c083ce87302 100644 (file)
@@ -118,30 +118,33 @@ ngx_chain_t *ngx_freebsd_sendfile_chain(ngx_connection_t *c, ngx_chain_t *in)
             }
         }
 
-        /* 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;
+            }
         }
 
         /*