aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2004-03-11 21:34:52 +0000
committerIgor Sysoev <igor@sysoev.ru>2004-03-11 21:34:52 +0000
commita893eab667078a8ad9f473296663b36e6ade111a (patch)
tree5eb4a198f0e0976948fc154c832663db661a4a91 /src
parent6bb889f442bd7c5c6f640021014014ebc59bac27 (diff)
downloadnginx-a893eab667078a8ad9f473296663b36e6ade111a.tar.gz
nginx-a893eab667078a8ad9f473296663b36e6ade111a.zip
nginx-0.0.2-2004-03-12-00:34:52 import
Diffstat (limited to 'src')
-rw-r--r--src/core/ngx_cycle.c20
-rw-r--r--src/http/ngx_http_headers.c2
2 files changed, 8 insertions, 14 deletions
diff --git a/src/core/ngx_cycle.c b/src/core/ngx_cycle.c
index 7fcc67908..4e61a5476 100644
--- a/src/core/ngx_cycle.c
+++ b/src/core/ngx_cycle.c
@@ -226,20 +226,14 @@ ngx_cycle_t *ngx_init_cycle(ngx_cycle_t *old_cycle)
}
}
-#if (WIN32)
-#if 0
- /* TODO: TEST */
-fprintf(stderr, "BEFORE\n");
- CloseHandle(GetStdHandle(STD_ERROR_HANDLE));
- SetStdHandle(STD_ERROR_HANDLE, cycle->log->file->fd);
-fprintf(stderr, "AFTER\n");
-#endif
-#else
+#if !(WIN32)
+
if (dup2(cycle->log->file->fd, STDERR_FILENO) == NGX_ERROR) {
ngx_log_error(NGX_LOG_EMERG, log, ngx_errno,
"dup2(STDERR) failed");
failed = 1;
}
+
#endif
if (failed) {
@@ -454,15 +448,13 @@ void ngx_reopen_files(ngx_cycle_t *cycle, ngx_uid_t user)
file[i].fd = fd;
}
-#if (WIN32)
- /* TODO: TEST */
- CloseHandle(GetStdHandle(STD_ERROR_HANDLE));
- SetStdHandle(STD_ERROR_HANDLE, cycle->log->file->fd);
-#else
+#if !(WIN32)
+
if (dup2(cycle->log->file->fd, STDERR_FILENO) == -1) {
ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_errno,
"dup2(STDERR) failed");
}
+
#endif
}
diff --git a/src/http/ngx_http_headers.c b/src/http/ngx_http_headers.c
index 128744917..1820ea768 100644
--- a/src/http/ngx_http_headers.c
+++ b/src/http/ngx_http_headers.c
@@ -19,8 +19,10 @@ ngx_http_header_t ngx_http_headers_in[] = {
{ ngx_string("If-Range"), offsetof(ngx_http_headers_in_t, if_range) },
#endif
+#if (NGX_HTTP_GZIP)
{ ngx_string("Accept-Encoding"),
offsetof(ngx_http_headers_in_t, accept_encoding) },
+#endif
{ ngx_string("Authorization"),
offsetof(ngx_http_headers_in_t, authorization) },