diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2004-11-11 14:07:14 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2004-11-11 14:07:14 +0000 |
| commit | 1b73583ba2c0e4b72d951218827e0c621427d389 (patch) | |
| tree | 9e4d204e2cce91560d5cb8908b8a1a9f2c1d92ee /src/http/ngx_http_log_handler.c | |
| parent | d6f24959428caed68a509a19ca4fd866d978a69c (diff) | |
| download | nginx-1b73583ba2c0e4b72d951218827e0c621427d389.tar.gz nginx-1b73583ba2c0e4b72d951218827e0c621427d389.tar.bz2 | |
nginx-0.1.5-RELEASE importrelease-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.
Diffstat (limited to 'src/http/ngx_http_log_handler.c')
| -rw-r--r-- | src/http/ngx_http_log_handler.c | 35 |
1 files changed, 4 insertions, 31 deletions
diff --git a/src/http/ngx_http_log_handler.c b/src/http/ngx_http_log_handler.c index 9a1389d13..581a1ce65 100644 --- a/src/http/ngx_http_log_handler.c +++ b/src/http/ngx_http_log_handler.c @@ -133,7 +133,7 @@ ngx_int_t ngx_http_log_handler(ngx_http_request_t *r) ngx_http_log_t *log; ngx_http_log_op_t *op; ngx_http_log_loc_conf_t *lcf; -#if (WIN32) +#if (NGX_WIN32) u_long written; #endif @@ -160,7 +160,7 @@ ngx_int_t ngx_http_log_handler(ngx_http_request_t *r) } } -#if (WIN32) +#if (NGX_WIN32) len += 2; #else len++; @@ -186,7 +186,7 @@ ngx_int_t ngx_http_log_handler(ngx_http_request_t *r) } } -#if (WIN32) +#if (NGX_WIN32) *p++ = CR; *p++ = LF; WriteFile(log[l].file->fd, line, p - line, &written, NULL); #else @@ -211,12 +211,6 @@ static u_char *ngx_http_log_connection(ngx_http_request_t *r, u_char *buf, uintptr_t data) { return ngx_sprintf(buf, "%ui", r->connection->number); - -#if 0 - return buf + ngx_snprintf((char *) buf, NGX_INT_T_LEN + 1, - "%" NGX_UINT_T_FMT, - r->connection->number); -#endif } @@ -249,11 +243,6 @@ static u_char *ngx_http_log_msec(ngx_http_request_t *r, u_char *buf, ngx_gettimeofday(&tv); return ngx_sprintf(buf, "%l.%03l", tv.tv_sec, tv.tv_usec / 1000); - -#if 0 - return buf + ngx_snprintf((char *) buf, TIME_T_LEN + 5, "%ld.%03ld", - tv.tv_sec, tv.tv_usec / 1000); -#endif } @@ -274,11 +263,6 @@ static u_char *ngx_http_log_status(ngx_http_request_t *r, u_char *buf, { return ngx_sprintf(buf, "%ui", r->err_status ? r->err_status : r->headers_out.status); - -#if 0 - return buf + ngx_snprintf((char *) buf, 4, "%" NGX_UINT_T_FMT, - r->err_status ? r->err_status : r->headers_out.status); -#endif } @@ -286,11 +270,6 @@ static u_char *ngx_http_log_length(ngx_http_request_t *r, u_char *buf, uintptr_t data) { return ngx_sprintf(buf, "%O", r->connection->sent); - -#if 0 - return buf + ngx_snprintf((char *) buf, NGX_OFF_T_LEN + 1, OFF_T_FMT, - r->connection->sent); -#endif } @@ -298,10 +277,6 @@ static u_char *ngx_http_log_apache_length(ngx_http_request_t *r, u_char *buf, uintptr_t data) { return ngx_sprintf(buf, "%O", r->connection->sent - r->header_size); -#if 0 - return buf + ngx_snprintf((char *) buf, NGX_OFF_T_LEN + 1, OFF_T_FMT, - r->connection->sent - r->header_size); -#endif } @@ -470,9 +445,7 @@ static u_char *ngx_http_log_header_out(ngx_http_request_t *r, u_char *buf, if (buf == NULL) { return (u_char *) NGX_OFF_T_LEN; } - return buf + ngx_snprintf((char *) buf, - NGX_OFF_T_LEN + 2, OFF_T_FMT, - r->headers_out.content_length_n); + return ngx_sprintf(buf, "%O", r->headers_out.content_length_n); } if (data == offsetof(ngx_http_headers_out_t, last_modified)) { |
