|
From: | Fatih Aydin |
Subject: | Re: Letter-case conversions in network protocols |
Date: | Mon, 17 Jan 2022 12:41:18 +0300 |
Daniel MartÃn <mardani29@yahoo.es> writes:
> Of course, code can still be broken if people explicitly do its own
> thing with `downcase', etc. instead of using the case-folding string
> APIs, but that's sort of an anti-pattern, anyway.
But code does this sort of thing -- for instance, Message allows headers
to be specified in various ways, but will run the header names trough
`capitalize'.
So this isn't just about doing comparisons, but separating out text
transformations that are done according to a protocol specification
(i.e., octets that happen to be ASCII) vs. the normal DWIM text
transformations.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
[Prev in Thread] | Current Thread | [Next in Thread] |