cmserver: check for valid formats earlier in request handling