OSDir


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mod_proxy_html and special characters


For clarity's sake, the spec defines these two entities as not-equal.

Of course, %41 and 'A' are equivilant, so such a function might not be a bad thing to have in refactoring URI handling.

On Mon, May 28, 2018, 04:10 Nick Kew <niq@xxxxxxxxxx> wrote:

>> ctx->buf  = http://internal/!%22%23$/
>> m->from.c = http://internal/!"#$/

A further thought arising from that.

Just as strcasecmp is case-independent, the world could no doubt use
a standard library function that would treat the above as equal.

Something like
int stringcmp(const char *a, const char *b, unsigned int flags)
where flags would control behaviour such as case-independence,
and equivalence over URLencoding, HTML encoding, HTML entities,
and whatever else someone might like to support (maybe integrate
with locale too?).

Anyone know of such a thing?

--
Nick Kew