Skip to content

Commit f54e88f

Browse files
committed
fix: NewRESTAddress use http as default scheme
fixes #990 The PR #986 set the scheme configurable in NewRESTAddress, but didn't consider a default value when scheme is empty string. This commit will set http as the default value when scheme is an empty string. Signed-off-by: Jude Hung <[email protected]>
1 parent b20d5f4 commit f54e88f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

dtos/address.go

+3
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ type RESTAddress struct {
6969
}
7070

7171
func NewRESTAddress(host string, port int, httpMethod string, scheme string) Address {
72+
if scheme == "" {
73+
scheme = common.HTTP
74+
}
7275
return Address{
7376
Type: common.REST,
7477
Host: host,

0 commit comments

Comments
 (0)