Skip to content

Commit

Permalink
[xds_fed_name_parsing] fix test, reject short form
Browse files Browse the repository at this point in the history
  • Loading branch information
menghanl committed Dec 6, 2021
1 parent c6450ad commit 88451ec
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions xds/internal/xdsclient/xdsresource/name.go
Expand Up @@ -57,6 +57,10 @@ func ParseName(name string) *Name {
// Return "" scheme to use the default authority for the server.
return &Name{ID: name}
}
if !strings.Contains(name, "://") {
// Only the long form URL, with ://, is valid.
return &Name{ID: name}
}
parsed, err := url.Parse(name)
if err != nil {
return &Name{ID: name}
Expand Down

0 comments on commit 88451ec

Please sign in to comment.