projects
/
arvados.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e5164c2
)
20831: Don't panic on empty params
author
Peter Amstutz <peter.amstutz@curii.com>
Fri, 17 Nov 2023 20:37:23 +0000
(15:37 -0500)
committer
Peter Amstutz <peter.amstutz@curii.com>
Fri, 17 Nov 2023 20:37:23 +0000
(15:37 -0500)
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz@curii.com>
lib/controller/rpc/conn.go
patch
|
blob
|
history
diff --git
a/lib/controller/rpc/conn.go
b/lib/controller/rpc/conn.go
index 095ce225f66ce20e58515903a3904af5eb6a61c2..6195b79da13794cee9dcfd2143cf05e3321a4a5e 100644
(file)
--- a/
lib/controller/rpc/conn.go
+++ b/
lib/controller/rpc/conn.go
@@
-147,10
+147,13
@@
func (conn *Conn) requestAndDecode(ctx context.Context, dst interface{}, ep arva
}
if len(tokens) > 1 {
+ if params == nil {
+ params = make(map[string]interface{})
+ }
params["reader_tokens"] = tokens[1:]
}
path := ep.Path
- if strings.Contains(ep.Path, "/{uuid}") {
+ if strings.Contains(ep.Path, "/{uuid}")
&& params != nil
{
uuid, _ := params["uuid"].(string)
path = strings.Replace(path, "/{uuid}", "/"+uuid, 1)
delete(params, "uuid")