diff --git a/base/aaa/role.go b/base/aaa/role.go index 6e5755b1..7c88ea1a 100644 --- a/base/aaa/role.go +++ b/base/aaa/role.go @@ -11,7 +11,7 @@ import ( ) func _role_keys(key ...string) string { - if _key := kit.Slice(strings.Split(key[0], ice.PT), -1)[0]; _key != "" { + if _key := kit.Select("", strings.Split(key[0], ice.PT), -1); _key != "" { if c, ok := ice.Info.Index[_key].(*ice.Context); ok && kit.Keys(c.Prefix(), _key) == key[0] { key[0] = _key } diff --git a/base/web/serve.go b/base/web/serve.go index 1abdd777..8b2137d2 100644 --- a/base/web/serve.go +++ b/base/web/serve.go @@ -115,6 +115,9 @@ func _serve_auth(m *ice.Message, key string, cmds []string, w http.ResponseWrite if r.URL.Path == PP(SPACE) { return cmds, true } + kit.For(r.Header, func(k string, v []string) { + m.Debug("what %v: %v", k, v) + }) defer func() { m.Options(ice.MSG_CMDS, "", ice.MSG_SESSID, "") }() if aaa.SessCheck(m, m.Option(ice.MSG_SESSID)); m.Option(SHARE) != "" { switch msg := m.Cmd(SHARE, m.Option(SHARE)); msg.Append(mdb.TYPE) {