httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yann Ylavic <>
Subject Re: svn commit: r1715938 - /httpd/httpd/trunk/modules/cache/cache_util.c
Date Tue, 24 Nov 2015 16:15:36 GMT
On Tue, Nov 24, 2015 at 5:09 PM, Graham Leggett <> wrote:
> A further optimisation - in many cases the fast path is really a case sensitive string
comparison, given that the vast majority of the time the case being used is the case quoted
in the spec.
> In other words, while mAx-AgE is valid, it is almost always max-age.
> Does it make sense to do a case sensitive comparison first, and then fall back to case

Not sure:
    if (!strcmp(h, "max-age")
        || ap_cmpcasestr(h, "max-age"))
is likely to be a bit faster than a single ap_cmpcasestr() when it
matches, but much slower when it does not.


View raw message