commit - 36f94f06b08270ab5d4465aa61ae025c98e24c2c
commit + 51762770ad906c93ca83830aee8d17f8acba8c29
blob - ac838023e0eb83c222129878c8b2b0eb79b3da8b
blob + 31e85d1dd2901bc5a50da2e55c2c0a8892e79c27
--- iri.c
+++ iri.c
return (0);
}
+static inline void
+lowerify(char *s)
+{
+ for (; *s; ++s)
+ *s = tolower((unsigned char)*s);
+}
+
static void
cpfields(struct iri *dest, const struct iri *src, int flags)
{
if (src->iri_flags & IH_SCHEME)
memcpy(dest->iri_scheme, src->iri_scheme,
sizeof(dest->iri_scheme));
+ lowerify(dest->iri_scheme);
}
if (flags & IH_UINFO) {
dest->iri_flags |= IH_UINFO;
if (src->iri_flags & IH_HOST)
memcpy(dest->iri_host, src->iri_host,
sizeof(dest->iri_host));
+ lowerify(dest->iri_host);
}
if (flags & IH_PORT) {
dest->iri_flags |= IH_PORT;