Are you sure these length checks are correct? `p->nKeyLength` includes the trailing NUL byte (at least it should ^^), so I'd expect a comparison against `sizeof("CONTENT_TYPE")` here (without the -1).