patch: handle gerrit results that omit http/https results

When dealing with GoB instances that do not support http or https
(and only support sso), the patch walking loader fails since it
always assumes http is available.  Rework the code to walk a bunch
of known protocols instead and stop when we find one that works.

TEST=`gerrit -g googleplex-android inspect 825814` doesn't fail on patch parsing

Change-Id: Id7338b973f566254459350a6b708c96fbdf4f8b7
Commit-Ready: Mike Frysinger <>
Tested-by: Mike Frysinger <>
Reviewed-by: Don Garrett <>
2 files changed