diff src/http/modules/ngx_http_static_handler.c @ 10:46833bd150cb NGINX_0_1_5

nginx 0.1.5 *) Bugfix: on Solaris and Linux there may be too many "recvmsg() returned not enough data" alerts. *) Bugfix: there were the "writev() failed (22: Invalid argument)" errors on Solaris in proxy mode without sendfile. On other platforms that do not support sendfile at all the process got caught in an endless loop. *) Bugfix: segmentation fault on Solaris in proxy mode and using sendfile. *) Bugfix: segmentation fault on Solaris. *) Bugfix: on-line upgrade did not work on Linux. *) Bugfix: the ngx_http_autoindex_module module did not escape the spaces, the quotes, and the percent signs in the directory listing. *) Change: the decrease of the copy operations. *) Feature: the userid_p3p directive.
author Igor Sysoev <http://sysoev.ru>
date Thu, 11 Nov 2004 00:00:00 +0300
parents f0b350454894
children 8a529698ed55
line wrap: on
line diff
--- a/src/http/modules/ngx_http_static_handler.c
+++ b/src/http/modules/ngx_http_static_handler.c
@@ -197,7 +197,7 @@ static ngx_int_t ngx_http_static_handler
                                   &name, &file_crc);
 
         ngx_log_debug1(NGX_LOG_DEBUG_HTTP, log, 0,
-                       "http open file cache get: " PTR_FMT, file);
+                       "http open file cache get: %p", file);
 
         if (file && !file->expired) {
             r->cache = file;
@@ -216,7 +216,7 @@ static ngx_int_t ngx_http_static_handler
                                       &name, &redirect_crc);
 
         ngx_log_debug1(NGX_LOG_DEBUG_HTTP, log, 0,
-                       "http redirect cache get: " PTR_FMT, redirect);
+                       "http redirect cache get: %p", redirect);
 
         if (redirect && !redirect->expired) {
 
@@ -247,7 +247,7 @@ static ngx_int_t ngx_http_static_handler
 
     /* open file */
 
-#if (WIN9X)
+#if (NGX_WIN9X)
 
     /* TODO: redirect cache */
 
@@ -276,7 +276,8 @@ static ngx_int_t ngx_http_static_handler
         }
 
         if (ngx_is_dir(&fi)) {
-            ngx_log_debug(log, "HTTP DIR: '%s'" _ name.data);
+            ngx_log_debug1(NGX_LOG_DEBUG_HTTP, log, 0,
+                           "HTTP DIR: \"%s\"", name.data);
 
             if (!(r->headers_out.location =
                    ngx_http_add_header(&r->headers_out, ngx_http_headers_out)))
@@ -384,7 +385,7 @@ static ngx_int_t ngx_http_static_handler
             location.len--;
 
             ngx_log_debug1(NGX_LOG_DEBUG_HTTP, log, 0,
-                           "http redirect cache alloc: " PTR_FMT, redirect);
+                           "http redirect cache alloc: %p", redirect);
 
             if (redirect) {
                 redirect->fd = NGX_INVALID_FILE;
@@ -403,11 +404,11 @@ static ngx_int_t ngx_http_static_handler
         return NGX_HTTP_MOVED_PERMANENTLY;
     }
 
-#if !(WIN32) /* the not regular files are probably Unix specific */
+#if !(NGX_WIN32) /* the not regular files are probably Unix specific */
 
     if (!ngx_is_file(&fi)) {
         ngx_log_error(NGX_LOG_CRIT, log, ngx_errno,
-                      "%s is not a regular file", name.data);
+                      "\"%s\" is not a regular file", name.data);
 
         if (ngx_close_file(fd) == NGX_FILE_ERROR) {
             ngx_log_error(NGX_LOG_ALERT, log, ngx_errno,
@@ -459,7 +460,7 @@ static ngx_int_t ngx_http_static_handler
 #endif
 
         ngx_log_debug1(NGX_LOG_DEBUG_HTTP, log, 0,
-                       "http open file cache alloc: " PTR_FMT, file);
+                       "http open file cache alloc: %p", file);
 
         if (file) {
             file->fd = fd;