mirror of
https://github.com/astaxie/beego.git
synced 2024-12-22 18:30:50 +00:00
Rlock for form query
This commit is contained in:
parent
55e6298f29
commit
3e2c795410
@ -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)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user