wininet: parse cookie information from cookie value

Rob Shearman robertshearman at gmail.com
Fri Feb 13 18:01:45 CST 2009


2009/2/13 Aric Stewart <aric at codeweavers.com>:
> +        if (CompareStringW(GetThreadLocale(), NORM_IGNORECASE, ptr, 6,
> +                           szDomain, 6) == 2)

LOCALE_INVARIANT should be used when comparing with a constant string.
See here for the reasons why:
http://blogs.msdn.com/michkap/archive/2004/12/29/344136.aspx
http://blogs.msdn.com/larryosterman/archive/2004/07/01/171078.aspx
http://msdn.microsoft.com/en-us/library/dd373795(VS.85).aspx

It doesn't look like it's implemented in Wine, so I guess you should
just use MAKELCID(LANG_ENGLISH, SUBLANG_DEFAULT) with a FIXME to use
LOCALE_INVARIANT when it's implemented.

And, yes, there's probably lots of other places where we do case
insensitive comparisons incorrectly like this, but we should stop
introducing new ones.
-- 
Rob Shearman



More information about the wine-devel mailing list