golang / gddo

Go Doc Dot Org
https://godoc.org
BSD 3-Clause "New" or "Revised" License
1.1k stars 265 forks source link

can't redirect with protocol ssh #565

Open Bren2010 opened 6 years ago

Bren2010 commented 6 years ago

If a go-import-redirector provides something like

<meta name="go-import" content="code.host.com/path/to/repo git ssh://git@source-repo.com/path/to/repo">

the documentation will fail to load with error

ERROR: bad path from meta: ssh://git@source-repo.com/path/to/repo code.host.com/path/to/repo

This bug looks like it was introduced by daffe1f90ec57f8ed69464f9094753fc6452e983 because git@source-repo.com isn't a valid host.