3 ms·
I may be missing something - why is tolower(c) incorrect here?
by neeeeees 6y ago
I may be missing something - why is tolower(c) incorrect here?
- kentonv 6y agoBecause if `c` is the letter 'I', and the current locale happens to be set to Turkish, then `tolower(c)` will return 'ı', not 'i'. If you are trying to lower-case an HTTP header name for the purpose of case-insensitive comparison, this is definitely not what you wanted. (And similar problems exist with several other locales; it's not just Turkish.)
- neeeeees 6y agoAh I see, thanks for explaining