提交 3e2c7954 编写于 作者: P playHing

Rlock for form query

上级 55e6298f
......@@ -334,11 +334,13 @@ func (input *BeegoInput) Query(key string) string {
}
if input.Context.Request.Form == nil {
input.dataLock.Lock()
defer input.dataLock.Unlock()
if input.Context.Request.Form == nil {
input.Context.Request.ParseForm()
}
input.dataLock.Unlock()
}
input.dataLock.RLock()
defer input.dataLock.RUnlock()
return input.Context.Request.Form.Get(key)
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册