If you specify an upload with the war param the config param is ignored. If you specify a war on the server with localWar then the context specified by config is used. This is the same behavior as the manager app. I wish you could upload a war and a config, but there should be an error raised if war and config are both set.
This issue is a subset of the issues described in 47467. Fixing 47467 will fix this. *** This bug has been marked as a duplicate of bug 47467 ***