Differences From Artifact [28126036a1]:
- File
src/OFHTTPServer.m
— part of check-in
[1de551cb5f]
at
2016-06-07 22:56:28
on branch trunk
— Add support for reusing OFStreams after close
Right now, this is only useful for OFTCPSocket, as this is the only
class so far not establishing the stream in the init method. However,
this adds the general infrastructure to allow reuse to all subclasses of
OFStream. (user: js, size: 16488) [annotate] [blame] [check-ins using]
To Artifact [30505eba7a]:
- File
src/OFHTTPServer.m
— part of check-in
[d9eb7b50b3]
at
2017-01-07 00:37:26
on branch trunk
— Add of_ascii_{to{upper,lower},is{alpha,alnum}}
These are independent of the locale and work on the ASCII character set.
Unlike the C ones, these are 8-bit safe, meaning if a character > 0x7F
is passed, is{alpha,alnum} returns false and to{upper,lower} returns the
original character. (user: js, size: 16527) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
150 151 152 153 154 155 156 | bool firstLetter = true; if (cString == NULL) @throw [OFOutOfMemoryException exceptionWithRequestedSize: strlen([key UTF8String])]; while (*tmp != '\0') { | | | > > | 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 | bool firstLetter = true; if (cString == NULL) @throw [OFOutOfMemoryException exceptionWithRequestedSize: strlen([key UTF8String])]; while (*tmp != '\0') { if (!of_ascii_isalpha(*tmp)) { firstLetter = true; tmp++; continue; } *tmp = (firstLetter ? of_ascii_toupper(*tmp) : of_ascii_tolower(*tmp)); firstLetter = false; tmp++; } return [OFString stringWithUTF8StringNoCopy: cString freeWhenDone: true]; |
︙ | ︙ |