From fb724e08fc0e4617f44952f664e0020076075b50 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Tue, 26 Aug 2008 16:16:18 +0000 Subject: Changes with nginx 0.7.12 26 Aug 2008 *) Feature: the "server_name" directive supports empty name "". *) Feature: the "gzip_disable" directive supports special "msie6" mask. *) Bugfix: if the "max_fails=0" parameter was used in upstream with several servers, then a worker process exited on a SIGFPE signal. Thanks to Maxim Dounin. *) Bugfix: a request body was dropped while redirection via an "error_page" directive. *) Bugfix: a full response was returned for request method HEAD while redirection via an "error_page" directive. *) Bugfix: the $r->header_in() method did not return value of the "Host", "User-Agent", and "Connection" request header lines; the bug had appeared in 0.7.0. --- src/core/ngx_string.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'src/core/ngx_string.h') diff --git a/src/core/ngx_string.h b/src/core/ngx_string.h index fff618b19..af2818639 100644 --- a/src/core/ngx_string.h +++ b/src/core/ngx_string.h @@ -54,9 +54,25 @@ void ngx_strlow(u_char *dst, u_char *src, size_t n); #define ngx_strstr(s1, s2) strstr((const char *) s1, (const char *) s2) -#define ngx_strchr(s1, c) strchr((const char *) s1, (int) c) #define ngx_strlen(s) strlen((const char *) s) +#define ngx_strchr(s1, c) strchr((const char *) s1, (int) c) + +static ngx_inline u_char * +ngx_strlchr(u_char *p, u_char *last, u_char c) +{ + while (p < last) { + + if (*p == c) { + return p; + } + + p++; + } + + return NULL; +} + /* * msvc and icc7 compile memset() to the inline "rep stos" -- cgit v1.2.1