nginxtra 1.2.6.8 → 1.2.7.8
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/nginxtra +1 -1
- data/bin/nginxtra_rails +1 -1
- data/lib/nginxtra/version.rb +1 -1
- data/vendor/nginx/CHANGES +72 -0
- data/vendor/nginx/CHANGES.ru +76 -0
- data/vendor/nginx/LICENSE +2 -2
- data/vendor/nginx/auto/cc/msvc +0 -3
- data/vendor/nginx/auto/lib/geoip/conf +17 -2
- data/vendor/nginx/auto/lib/libgd/conf +1 -1
- data/vendor/nginx/auto/lib/pcre/conf +1 -0
- data/vendor/nginx/auto/lib/perl/make +1 -3
- data/vendor/nginx/auto/lib/zlib/conf +4 -1
- data/vendor/nginx/man/nginx.8 +2 -2
- data/vendor/nginx/src/core/nginx.h +2 -2
- data/vendor/nginx/src/core/ngx_conf_file.c +4 -19
- data/vendor/nginx/src/core/ngx_conf_file.h +1 -10
- data/vendor/nginx/src/core/ngx_cycle.c +2 -19
- data/vendor/nginx/src/core/ngx_file.c +4 -4
- data/vendor/nginx/src/core/ngx_inet.c +1 -1
- data/vendor/nginx/src/core/ngx_inet.h +1 -1
- data/vendor/nginx/src/core/ngx_radix_tree.c +202 -5
- data/vendor/nginx/src/core/ngx_radix_tree.h +9 -0
- data/vendor/nginx/src/event/modules/ngx_poll_module.c +2 -2
- data/vendor/nginx/src/event/ngx_event.c +4 -0
- data/vendor/nginx/src/event/ngx_event_openssl.c +27 -13
- data/vendor/nginx/src/http/modules/ngx_http_auth_basic_module.c +38 -49
- data/vendor/nginx/src/http/modules/ngx_http_fastcgi_module.c +44 -59
- data/vendor/nginx/src/http/modules/ngx_http_geo_module.c +310 -103
- data/vendor/nginx/src/http/modules/ngx_http_geoip_module.c +145 -15
- data/vendor/nginx/src/http/modules/ngx_http_gzip_filter_module.c +5 -1
- data/vendor/nginx/src/http/modules/ngx_http_headers_filter_module.c +1 -0
- data/vendor/nginx/src/http/modules/ngx_http_image_filter_module.c +27 -13
- data/vendor/nginx/src/http/modules/ngx_http_log_module.c +378 -40
- data/vendor/nginx/src/http/modules/ngx_http_map_module.c +7 -0
- data/vendor/nginx/src/http/modules/ngx_http_proxy_module.c +9 -7
- data/vendor/nginx/src/http/modules/ngx_http_scgi_module.c +1 -1
- data/vendor/nginx/src/http/modules/ngx_http_secure_link_module.c +15 -2
- data/vendor/nginx/src/http/modules/ngx_http_split_clients_module.c +1 -1
- data/vendor/nginx/src/http/modules/ngx_http_sub_filter_module.c +2 -2
- data/vendor/nginx/src/http/modules/ngx_http_upstream_keepalive_module.c +4 -0
- data/vendor/nginx/src/http/modules/ngx_http_upstream_least_conn_module.c +3 -1
- data/vendor/nginx/src/http/modules/ngx_http_uwsgi_module.c +1 -1
- data/vendor/nginx/src/http/modules/ngx_http_xslt_filter_module.c +2 -2
- data/vendor/nginx/src/http/modules/perl/Makefile.PL +3 -14
- data/vendor/nginx/src/http/modules/perl/nginx.pm +2 -2
- data/vendor/nginx/src/http/ngx_http_core_module.c +2 -1
- data/vendor/nginx/src/http/ngx_http_script.c +3 -7
- data/vendor/nginx/src/http/ngx_http_upstream.c +9 -0
- data/vendor/nginx/src/http/ngx_http_upstream_round_robin.c +3 -1
- data/vendor/nginx/src/http/ngx_http_variables.c +114 -0
- data/vendor/nginx/src/http/ngx_http_write_filter_module.c +1 -1
- data/vendor/nginx/src/os/unix/ngx_files.c +1 -1
- data/vendor/nginx/src/os/unix/ngx_user.c +13 -14
- metadata +2 -2
data/bin/nginxtra
CHANGED
data/bin/nginxtra_rails
CHANGED
data/lib/nginxtra/version.rb
CHANGED
data/vendor/nginx/CHANGES
CHANGED
@@ -1,4 +1,76 @@
|
|
1
1
|
|
2
|
+
Changes with nginx 1.2.7 12 Feb 2013
|
3
|
+
|
4
|
+
*) Change: now if the "include" directive with mask is used on Unix
|
5
|
+
systems, included files are sorted in alphabetical order.
|
6
|
+
|
7
|
+
*) Change: the "add_header" directive adds headers to 201 responses.
|
8
|
+
|
9
|
+
*) Feature: the "geo" directive now supports IPv6 addresses in CIDR
|
10
|
+
notation.
|
11
|
+
|
12
|
+
*) Feature: the "flush" and "gzip" parameters of the "access_log"
|
13
|
+
directive.
|
14
|
+
|
15
|
+
*) Feature: variables support in the "auth_basic" directive.
|
16
|
+
|
17
|
+
*) Feature: the $pipe, $request_length, $time_iso8601, and $time_local
|
18
|
+
variables can now be used not only in the "log_format" directive.
|
19
|
+
Thanks to Kiril Kalchev.
|
20
|
+
|
21
|
+
*) Feature: IPv6 support in the ngx_http_geoip_module.
|
22
|
+
Thanks to Gregor Kališnik.
|
23
|
+
|
24
|
+
*) Bugfix: nginx could not be built with the ngx_http_perl_module in
|
25
|
+
some cases.
|
26
|
+
|
27
|
+
*) Bugfix: a segmentation fault might occur in a worker process if the
|
28
|
+
ngx_http_xslt_module was used.
|
29
|
+
|
30
|
+
*) Bugfix: nginx could not be built on MacOSX in some cases.
|
31
|
+
Thanks to Piotr Sikora.
|
32
|
+
|
33
|
+
*) Bugfix: the "limit_rate" directive with high rates might result in
|
34
|
+
truncated responses on 32-bit platforms.
|
35
|
+
Thanks to Alexey Antropov.
|
36
|
+
|
37
|
+
*) Bugfix: a segmentation fault might occur in a worker process if the
|
38
|
+
"if" directive was used.
|
39
|
+
Thanks to Piotr Sikora.
|
40
|
+
|
41
|
+
*) Bugfix: a "100 Continue" response was issued with "413 Request Entity
|
42
|
+
Too Large" responses.
|
43
|
+
|
44
|
+
*) Bugfix: the "image_filter", "image_filter_jpeg_quality" and
|
45
|
+
"image_filter_sharpen" directives might be inherited incorrectly.
|
46
|
+
Thanks to Ian Babrou.
|
47
|
+
|
48
|
+
*) Bugfix: "crypt_r() failed" errors might appear if the "auth_basic"
|
49
|
+
directive was used on Linux.
|
50
|
+
|
51
|
+
*) Bugfix: in backup servers handling.
|
52
|
+
Thanks to Thomas Chen.
|
53
|
+
|
54
|
+
*) Bugfix: proxied HEAD requests might return incorrect response if the
|
55
|
+
"gzip" directive was used.
|
56
|
+
|
57
|
+
*) Bugfix: a segmentation fault occurred on start or during
|
58
|
+
reconfiguration if the "keepalive" directive was specified more than
|
59
|
+
once in a single upstream block.
|
60
|
+
|
61
|
+
*) Bugfix: in the "proxy_method" directive.
|
62
|
+
|
63
|
+
*) Bugfix: a segmentation fault might occur in a worker process if
|
64
|
+
resolver was used with the poll method.
|
65
|
+
|
66
|
+
*) Bugfix: nginx might hog CPU during SSL handshake with a backend if
|
67
|
+
the select, poll, or /dev/poll methods were used.
|
68
|
+
|
69
|
+
*) Bugfix: the "[crit] SSL_write() failed (SSL:)" error.
|
70
|
+
|
71
|
+
*) Bugfix: in the "fastcgi_keep_conn" directive.
|
72
|
+
|
73
|
+
|
2
74
|
Changes with nginx 1.2.6 11 Dec 2012
|
3
75
|
|
4
76
|
*) Feature: the $request_time and $msec variables can now be used not
|
data/vendor/nginx/CHANGES.ru
CHANGED
@@ -1,4 +1,80 @@
|
|
1
1
|
|
2
|
+
Изменения в nginx 1.2.7 12.02.2013
|
3
|
+
|
4
|
+
*) Изменение: теперь при использовании директивы include с маской на
|
5
|
+
Unix-системах включаемые файлы сортируются в алфавитном порядке.
|
6
|
+
|
7
|
+
*) Изменение: директива add_header добавляет строки в ответы с кодом
|
8
|
+
201.
|
9
|
+
|
10
|
+
*) Добавление: директива geo теперь поддерживает IPv6 адреса в формате
|
11
|
+
CIDR.
|
12
|
+
|
13
|
+
*) Добавление: параметры flush и gzip в директиве access_log.
|
14
|
+
|
15
|
+
*) Добавление: директива auth_basic поддерживает переменные.
|
16
|
+
|
17
|
+
*) Добавление: переменные $pipe, $request_length, $time_iso8601 и
|
18
|
+
$time_local теперь можно использовать не только в директиве
|
19
|
+
log_format.
|
20
|
+
Спасибо Kiril Kalchev.
|
21
|
+
|
22
|
+
*) Добавление: поддержка IPv6 в модуле ngx_http_geoip_module.
|
23
|
+
Спасибо Gregor Kališnik.
|
24
|
+
|
25
|
+
*) Исправление: nginx в некоторых случаях не собирался с модулем
|
26
|
+
ngx_http_perl_module.
|
27
|
+
|
28
|
+
*) Исправление: в рабочем процессе мог произойти segmentation fault,
|
29
|
+
если использовался модуль ngx_http_xslt_module.
|
30
|
+
|
31
|
+
*) Исправление: nginx мог не собираться на MacOSX.
|
32
|
+
Спасибо Piotr Sikora.
|
33
|
+
|
34
|
+
*) Исправление: при использовании директивы limit_rate с большими
|
35
|
+
значениями скорости на 32-битных системах ответ мог возвращаться не
|
36
|
+
целиком.
|
37
|
+
Спасибо Алексею Антропову.
|
38
|
+
|
39
|
+
*) Исправление: в рабочем процессе мог произойти segmentation fault,
|
40
|
+
если использовалась директива if.
|
41
|
+
Спасибо Piotr Sikora.
|
42
|
+
|
43
|
+
*) Исправление: ответ "100 Continue" выдавался вместе с ответом "413
|
44
|
+
Request Entity Too Large".
|
45
|
+
|
46
|
+
*) Исправление: директивы image_filter, image_filter_jpeg_quality и
|
47
|
+
image_filter_sharpen могли наследоваться некорректно.
|
48
|
+
Спасибо Ивану Боброву.
|
49
|
+
|
50
|
+
*) Исправление: при использовании директивы auth_basic под Linux могли
|
51
|
+
возникать ошибки "crypt_r() failed".
|
52
|
+
|
53
|
+
*) Исправление: в обработке backup-серверов.
|
54
|
+
Спасибо Thomas Chen.
|
55
|
+
|
56
|
+
*) Исправление: при проксировании HEAD-запросов мог возвращаться
|
57
|
+
некорректный ответ, если использовалась директива gzip.
|
58
|
+
|
59
|
+
*) Исправление: на старте или во время переконфигурации происходил
|
60
|
+
segmentation fault, если директива keepalive была указана несколько
|
61
|
+
раз в одном блоке upstream.
|
62
|
+
|
63
|
+
*) Исправление: директива proxy_method работала неверно, если была
|
64
|
+
указана на уровне http.
|
65
|
+
|
66
|
+
*) Исправление: в рабочем процессе мог произойти segmentation fault,
|
67
|
+
если использовался resolver и метод poll.
|
68
|
+
|
69
|
+
*) Исправление: nginx мог нагружать процессор во время SSL handshake с
|
70
|
+
бэкендом при использовании методов обработки соединений select, poll
|
71
|
+
и /dev/poll.
|
72
|
+
|
73
|
+
*) Исправление: ошибка "[crit] SSL_write() failed (SSL:)".
|
74
|
+
|
75
|
+
*) Исправление: в директиве fastcgi_keep_conn.
|
76
|
+
|
77
|
+
|
2
78
|
Изменения в nginx 1.2.6 11.12.2012
|
3
79
|
|
4
80
|
*) Добавление: переменные $request_time и $msec теперь можно
|
data/vendor/nginx/LICENSE
CHANGED
data/vendor/nginx/auto/cc/msvc
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
ngx_feature="GeoIP library"
|
7
7
|
ngx_feature_name=
|
8
8
|
ngx_feature_run=no
|
9
|
-
ngx_feature_incs=
|
9
|
+
ngx_feature_incs="#include <GeoIP.h>"
|
10
10
|
ngx_feature_path=
|
11
11
|
ngx_feature_libs="-lGeoIP"
|
12
12
|
ngx_feature_test="GeoIP_open(NULL, 0)"
|
@@ -18,6 +18,7 @@ if [ $ngx_found = no ]; then
|
|
18
18
|
# FreeBSD port
|
19
19
|
|
20
20
|
ngx_feature="GeoIP library in /usr/local/"
|
21
|
+
ngx_feature_path="/usr/local/include"
|
21
22
|
|
22
23
|
if [ $NGX_RPATH = YES ]; then
|
23
24
|
ngx_feature_libs="-R/usr/local/lib -L/usr/local/lib -lGeoIP"
|
@@ -34,7 +35,7 @@ if [ $ngx_found = no ]; then
|
|
34
35
|
# NetBSD port
|
35
36
|
|
36
37
|
ngx_feature="GeoIP library in /usr/pkg/"
|
37
|
-
ngx_feature_path="/usr/pkg/include
|
38
|
+
ngx_feature_path="/usr/pkg/include"
|
38
39
|
|
39
40
|
if [ $NGX_RPATH = YES ]; then
|
40
41
|
ngx_feature_libs="-R/usr/pkg/lib -L/usr/pkg/lib -lGeoIP"
|
@@ -64,8 +65,22 @@ fi
|
|
64
65
|
|
65
66
|
|
66
67
|
if [ $ngx_found = yes ]; then
|
68
|
+
|
69
|
+
CORE_INCS="$CORE_INCS $ngx_feature_path"
|
67
70
|
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
|
68
71
|
|
72
|
+
if [ $NGX_IPV6 = YES ]; then
|
73
|
+
ngx_feature="GeoIP IPv6 support"
|
74
|
+
ngx_feature_name="NGX_HAVE_GEOIP_V6"
|
75
|
+
ngx_feature_run=no
|
76
|
+
ngx_feature_incs="#include <stdio.h>
|
77
|
+
#include <GeoIP.h>"
|
78
|
+
#ngx_feature_path=
|
79
|
+
#ngx_feature_libs=
|
80
|
+
ngx_feature_test="printf(\"%d\", GEOIP_CITY_EDITION_REV0_V6);"
|
81
|
+
. auto/feature
|
82
|
+
fi
|
83
|
+
|
69
84
|
else
|
70
85
|
|
71
86
|
cat << END
|
@@ -35,7 +35,7 @@ if [ $ngx_found = no ]; then
|
|
35
35
|
# NetBSD port
|
36
36
|
|
37
37
|
ngx_feature="GD library in /usr/pkg/"
|
38
|
-
ngx_feature_path="/usr/pkg/include
|
38
|
+
ngx_feature_path="/usr/pkg/include"
|
39
39
|
|
40
40
|
if [ $NGX_RPATH = YES ]; then
|
41
41
|
ngx_feature_libs="-R/usr/pkg/lib -L/usr/pkg/lib -lgd"
|
@@ -26,9 +26,7 @@ $NGX_OBJS/src/http/modules/perl/Makefile: \
|
|
26
26
|
|
27
27
|
cd $NGX_OBJS/src/http/modules/perl \
|
28
28
|
&& NGX_PM_CFLAGS="\$(NGX_PM_CFLAGS) -g $NGX_CC_OPT" \
|
29
|
-
|
30
|
-
NGX_OBJS=$NGX_OBJS \
|
31
|
-
NGX_OPENSSL=$OPENSSL \
|
29
|
+
NGX_INCS="$CORE_INCS $NGX_OBJS $HTTP_INCS" \
|
32
30
|
$NGX_PERL Makefile.PL \
|
33
31
|
LIB=$NGX_PERL_MODULES \
|
34
32
|
INSTALLSITEMAN3DIR=$NGX_PERL_MODULES_MAN
|
@@ -9,11 +9,13 @@ if [ $ZLIB != NONE ]; then
|
|
9
9
|
case "$NGX_CC_NAME" in
|
10
10
|
|
11
11
|
msvc* | owc* | bcc)
|
12
|
+
have=NGX_ZLIB . auto/have
|
12
13
|
LINK_DEPS="$LINK_DEPS $ZLIB/zlib.lib"
|
13
14
|
CORE_LIBS="$CORE_LIBS $ZLIB/zlib.lib"
|
14
15
|
;;
|
15
16
|
|
16
17
|
icc*)
|
18
|
+
have=NGX_ZLIB . auto/have
|
17
19
|
LINK_DEPS="$LINK_DEPS $ZLIB/libz.a"
|
18
20
|
|
19
21
|
# to allow -ipo optimization we link with the *.o but not library
|
@@ -30,6 +32,7 @@ if [ $ZLIB != NONE ]; then
|
|
30
32
|
;;
|
31
33
|
|
32
34
|
*)
|
35
|
+
have=NGX_ZLIB . auto/have
|
33
36
|
LINK_DEPS="$LINK_DEPS $ZLIB/libz.a"
|
34
37
|
CORE_LIBS="$CORE_LIBS $ZLIB/libz.a"
|
35
38
|
#CORE_LIBS="$CORE_LIBS -L $ZLIB -lz"
|
@@ -45,7 +48,7 @@ else
|
|
45
48
|
# FreeBSD, Solaris, Linux
|
46
49
|
|
47
50
|
ngx_feature="zlib library"
|
48
|
-
ngx_feature_name=
|
51
|
+
ngx_feature_name="NGX_ZLIB"
|
49
52
|
ngx_feature_run=no
|
50
53
|
ngx_feature_incs="#include <zlib.h>"
|
51
54
|
ngx_feature_path=
|
data/vendor/nginx/man/nginx.8
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
.\"
|
2
|
-
.\" Copyright (
|
3
|
-
.\" Copyright (
|
2
|
+
.\" Copyright (C) 2010 Sergey A. Osokin
|
3
|
+
.\" Copyright (C) Nginx, Inc.
|
4
4
|
.\" All rights reserved.
|
5
5
|
.\"
|
6
6
|
.\" Redistribution and use in source and binary forms, with or without
|
@@ -945,7 +945,8 @@ ngx_conf_open_file(ngx_cycle_t *cycle, ngx_str_t *name)
|
|
945
945
|
file->name = *name;
|
946
946
|
}
|
947
947
|
|
948
|
-
file->
|
948
|
+
file->flush = NULL;
|
949
|
+
file->data = NULL;
|
949
950
|
|
950
951
|
return file;
|
951
952
|
}
|
@@ -954,7 +955,6 @@ ngx_conf_open_file(ngx_cycle_t *cycle, ngx_str_t *name)
|
|
954
955
|
static void
|
955
956
|
ngx_conf_flush_files(ngx_cycle_t *cycle)
|
956
957
|
{
|
957
|
-
ssize_t n, len;
|
958
958
|
ngx_uint_t i;
|
959
959
|
ngx_list_part_t *part;
|
960
960
|
ngx_open_file_t *file;
|
@@ -975,23 +975,8 @@ ngx_conf_flush_files(ngx_cycle_t *cycle)
|
|
975
975
|
i = 0;
|
976
976
|
}
|
977
977
|
|
978
|
-
|
979
|
-
|
980
|
-
if (file[i].buffer == NULL || len == 0) {
|
981
|
-
continue;
|
982
|
-
}
|
983
|
-
|
984
|
-
n = ngx_write_fd(file[i].fd, file[i].buffer, len);
|
985
|
-
|
986
|
-
if (n == NGX_FILE_ERROR) {
|
987
|
-
ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno,
|
988
|
-
ngx_write_fd_n " to \"%s\" failed",
|
989
|
-
file[i].name.data);
|
990
|
-
|
991
|
-
} else if (n != len) {
|
992
|
-
ngx_log_error(NGX_LOG_ALERT, cycle->log, 0,
|
993
|
-
ngx_write_fd_n " to \"%s\" was incomplete: %z of %uz",
|
994
|
-
file[i].name.data, n, len);
|
978
|
+
if (file[i].flush) {
|
979
|
+
file[i].flush(&file[i], cycle->log);
|
995
980
|
}
|
996
981
|
}
|
997
982
|
}
|
@@ -91,17 +91,8 @@ struct ngx_open_file_s {
|
|
91
91
|
ngx_fd_t fd;
|
92
92
|
ngx_str_t name;
|
93
93
|
|
94
|
-
|
95
|
-
u_char *pos;
|
96
|
-
u_char *last;
|
97
|
-
|
98
|
-
#if 0
|
99
|
-
/* e.g. append mode, error_log */
|
100
|
-
ngx_uint_t flags;
|
101
|
-
/* e.g. reopen db file */
|
102
|
-
ngx_uint_t (*handler)(void *data, ngx_open_file_t *file);
|
94
|
+
void (*flush)(ngx_open_file_t *file, ngx_log_t *log);
|
103
95
|
void *data;
|
104
|
-
#endif
|
105
96
|
};
|
106
97
|
|
107
98
|
|
@@ -1115,7 +1115,6 @@ ngx_test_lockfile(u_char *file, ngx_log_t *log)
|
|
1115
1115
|
void
|
1116
1116
|
ngx_reopen_files(ngx_cycle_t *cycle, ngx_uid_t user)
|
1117
1117
|
{
|
1118
|
-
ssize_t n, len;
|
1119
1118
|
ngx_fd_t fd;
|
1120
1119
|
ngx_uint_t i;
|
1121
1120
|
ngx_list_part_t *part;
|
@@ -1139,24 +1138,8 @@ ngx_reopen_files(ngx_cycle_t *cycle, ngx_uid_t user)
|
|
1139
1138
|
continue;
|
1140
1139
|
}
|
1141
1140
|
|
1142
|
-
|
1143
|
-
|
1144
|
-
if (file[i].buffer && len != 0) {
|
1145
|
-
|
1146
|
-
n = ngx_write_fd(file[i].fd, file[i].buffer, len);
|
1147
|
-
|
1148
|
-
if (n == NGX_FILE_ERROR) {
|
1149
|
-
ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno,
|
1150
|
-
ngx_write_fd_n " to \"%s\" failed",
|
1151
|
-
file[i].name.data);
|
1152
|
-
|
1153
|
-
} else if (n != len) {
|
1154
|
-
ngx_log_error(NGX_LOG_ALERT, cycle->log, 0,
|
1155
|
-
ngx_write_fd_n " to \"%s\" was incomplete: %z of %uz",
|
1156
|
-
file[i].name.data, n, len);
|
1157
|
-
}
|
1158
|
-
|
1159
|
-
file[i].pos = file[i].buffer;
|
1141
|
+
if (file[i].flush) {
|
1142
|
+
file[i].flush(&file[i], cycle->log);
|
1160
1143
|
}
|
1161
1144
|
|
1162
1145
|
fd = ngx_open_file(file[i].name.data, NGX_FILE_APPEND,
|
@@ -732,14 +732,14 @@ ngx_copy_file(u_char *from, u_char *to, ngx_copy_file_t *cf)
|
|
732
732
|
|
733
733
|
n = ngx_read_fd(fd, buf, len);
|
734
734
|
|
735
|
-
if (n ==
|
735
|
+
if (n == -1) {
|
736
736
|
ngx_log_error(NGX_LOG_ALERT, cf->log, ngx_errno,
|
737
737
|
ngx_read_fd_n " \"%s\" failed", from);
|
738
738
|
goto failed;
|
739
739
|
}
|
740
740
|
|
741
741
|
if ((size_t) n != len) {
|
742
|
-
ngx_log_error(NGX_LOG_ALERT, cf->log,
|
742
|
+
ngx_log_error(NGX_LOG_ALERT, cf->log, 0,
|
743
743
|
ngx_read_fd_n " has read only %z of %uz from %s",
|
744
744
|
n, size, from);
|
745
745
|
goto failed;
|
@@ -747,14 +747,14 @@ ngx_copy_file(u_char *from, u_char *to, ngx_copy_file_t *cf)
|
|
747
747
|
|
748
748
|
n = ngx_write_fd(nfd, buf, len);
|
749
749
|
|
750
|
-
if (n ==
|
750
|
+
if (n == -1) {
|
751
751
|
ngx_log_error(NGX_LOG_ALERT, cf->log, ngx_errno,
|
752
752
|
ngx_write_fd_n " \"%s\" failed", to);
|
753
753
|
goto failed;
|
754
754
|
}
|
755
755
|
|
756
756
|
if ((size_t) n != len) {
|
757
|
-
ngx_log_error(NGX_LOG_ALERT, cf->log,
|
757
|
+
ngx_log_error(NGX_LOG_ALERT, cf->log, 0,
|
758
758
|
ngx_write_fd_n " has written only %z of %uz to %s",
|
759
759
|
n, size, to);
|
760
760
|
goto failed;
|