Adds ability to select between http/https protocols. Fixes bug 898097. Change-Id: I1d20f314fb7dd8c5462c1f1ff22161ab59c35016