[core] Improve CAP request handling