Differences From Artifact [99f47b2418]:
- File
src/OFArchiveURIHandler.m
— part of check-in
[9b3cae6cba]
at
2022-10-09 16:33:24
on branch trunk
— Drop of- prefix from URI schemes
It's generally uncommon to prefix those.
Additionally, it might be worthwhile to try to get those actually
registered, which requires usage. (user: js, size: 5257) [annotate] [blame] [check-ins using]
To Artifact [010e8050b6]:
- File
src/OFArchiveURIHandler.m
— part of check-in
[3e455c4839]
at
2022-10-11 19:27:09
on branch trunk
— OFURI: Make scheme and path nonnull
This is as per the RFC, which says the scheme and path can never be
missing, while the path can be empty. (user: js, size: 5253) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
173 174 175 176 177 178 179 | @end OFURI * OFArchiveURIHandlerURIForFileInArchive(OFString *scheme, OFString *pathInArchive, OFURI *archiveURI) { static OFOnceControl onceControl = OFOnceControlInitValue; | | < | 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 | @end OFURI * OFArchiveURIHandlerURIForFileInArchive(OFString *scheme, OFString *pathInArchive, OFURI *archiveURI) { static OFOnceControl onceControl = OFOnceControlInitValue; OFMutableURI *ret = [OFMutableURI URIWithScheme: scheme]; void *pool = objc_autoreleasePoolPush(); OFString *archiveURIString; OFOnce(&onceControl, initPathAllowedCharacters); pathInArchive = [pathInArchive stringByAddingPercentEncodingWithAllowedCharacters: pathAllowedCharacters]; archiveURIString = [archiveURI.string stringByAddingPercentEncodingWithAllowedCharacters: pathAllowedCharacters]; ret.percentEncodedPath = [OFString stringWithFormat: @"%@!%@", archiveURIString, pathInArchive]; [ret makeImmutable]; objc_autoreleasePoolPop(pool); return ret; } |