aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/ngx_string.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/ngx_string.c b/src/core/ngx_string.c
index a41c38d37..f8641b7ab 100644
--- a/src/core/ngx_string.c
+++ b/src/core/ngx_string.c
@@ -429,8 +429,12 @@ ngx_vslprintf(u_char *buf, u_char *last, const char *fmt, va_list args)
case 'N':
#if (NGX_WIN32)
*buf++ = CR;
-#endif
+ if (buf < last) {
+ *buf++ = LF;
+ }
+#else
*buf++ = LF;
+#endif
fmt++;
continue;