nginx-0.1.37-RELEASE import
*) Change: now the "\n" is added to the end of the "nginx.pid" file.
*) Bugfix: the responses may be transferred not completely, if many
parts or the big parts were included by SSI.
*) Bugfix: if all backends had returned the 404 reponse and the
"http_404" parameter of the "proxy_next_upstream" or
"fastcgi_next_upstream" directives was used, then nginx started to
request all backends again.
diff --git a/src/core/nginx.h b/src/core/nginx.h
index 4e9ff79..f9f1a06 100644
--- a/src/core/nginx.h
+++ b/src/core/nginx.h
@@ -8,7 +8,7 @@
#define _NGINX_H_INCLUDED_
-#define NGINX_VER "nginx/0.1.36"
+#define NGINX_VER "nginx/0.1.37"
#define NGINX_VAR "NGINX"
#define NGX_NEWPID_EXT ".newbin"
diff --git a/src/core/ngx_cycle.c b/src/core/ngx_cycle.c
index 5780643..b67223a 100644
--- a/src/core/ngx_cycle.c
+++ b/src/core/ngx_cycle.c
@@ -744,7 +744,7 @@
}
if (!ngx_test_config) {
- len = ngx_sprintf(pid, "%P", ngx_pid) - pid;
+ len = ngx_sprintf(pid, "%P%N", ngx_pid) - pid;
if (ngx_write_file(&file, pid, len, 0) == NGX_ERROR) {
return NGX_ERROR;
diff --git a/src/core/ngx_string.c b/src/core/ngx_string.c
index 9cbf3c9..e21a9fc 100644
--- a/src/core/ngx_string.c
+++ b/src/core/ngx_string.c
@@ -62,6 +62,7 @@
* %V pointer to ngx_str_t
* %s null-terminated string
* %Z '\0'
+ * %N '\n'
* %c char
* %% %
*
@@ -315,6 +316,15 @@
continue;
+ case 'N':
+#if (NGX_WIN32)
+ *buf++ = CR;
+#endif
+ *buf++ = LF;
+ fmt++;
+
+ continue;
+
case '%':
*buf++ = '%';
fmt++;
diff --git a/src/core/ngx_times.c b/src/core/ngx_times.c
index f43987e..3b0dc37 100644
--- a/src/core/ngx_times.c
+++ b/src/core/ngx_times.c
@@ -60,11 +60,11 @@
static u_char cached_err_log_time[NGX_TIME_SLOTS]
- [sizeof("1970/09/28 12:00:00")];
+ [sizeof("1970/09/28 12:00:00")];
static u_char cached_http_time[NGX_TIME_SLOTS]
- [sizeof("Mon, 28 Sep 1970 06:00:00 GMT")];
+ [sizeof("Mon, 28 Sep 1970 06:00:00 GMT")];
static u_char cached_http_log_time[NGX_TIME_SLOTS]
- [sizeof("28/Sep/1970:12:00:00 +0600")];
+ [sizeof("28/Sep/1970:12:00:00 +0600")];
static char *week[] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };