5 messages in ru.sysoev.nginxRe: nginx-0.7.49
FromSent OnAttachments
Igor SysoevApr 6, 2009 3:44 am 
Maxim DouninApr 6, 2009 4:30 am 
Maxim DouninApr 6, 2009 4:42 am 
Igor SysoevApr 6, 2009 4:44 am 
Maxim DouninApr 6, 2009 8:23 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: nginx-0.7.49Actions...
From:Maxim Dounin (mdou@mdounin.ru)
Date:Apr 6, 2009 8:23:30 am
List:ru.sysoev.nginx

Hello!

On Mon, Apr 06, 2009 at 03:44:49PM +0400, Igor Sysoev wrote:

Disregard this. It should be

diff --git a/src/core/ngx_string.c b/src/core/ngx_string.c --- a/src/core/ngx_string.c +++ b/src/core/ngx_string.c @@ -703,14 +703,14 @@ ngx_strlcasestrn(u_char *s1, u_char *las { ngx_uint_t c1, c2;

- if (s1 <= last) { - return NULL; - } - c2 = (ngx_uint_t) *s2++; c2 = (c2 >= 'A' && c2 <= 'Z') ? (c2 | 0x20) : c2; last -= n;

+ if (s1 >= last) { + return NULL; + } + do { do { if (s1 == last) {

Shame on me again.

p.s. 0.7.49 doesn't handle $args_* at all.

Yes. Actually it's enough:

do { do { if (s1 >= last) {

Yes, of course. For some reason I was under impression that "==" check should be a bit faster, but looks like it's not true at least with modern compilers / processors. At least gcc compiles "==" and ">=" to nearly identical CMP+JCC.