Browse Source

no message

Cheng Jian 2 years ago
parent
commit
010372c76c
1 changed files with 3 additions and 0 deletions
  1. 3 0
      rpcx-gateway/converter.go

+ 3 - 0
rpcx-gateway/converter.go

@@ -168,6 +168,9 @@ func getRpcxHeader(r *http.Request, key string) string {
 }
 
 func getUrlParams(r *http.Request, metadata map[string]string) map[string]string {
+	if len(metadata) == 0 {
+		metadata = make(map[string]string)
+	}
 	query := r.URL.Query()
 	for k, v := range query {
 		if k != XMeta {