mirror of
https://github.com/astaxie/beego.git
synced 2024-12-22 18:20:50 +00:00
Fix concurrent form parsing and getting
This commit is contained in:
parent
b50fb44950
commit
55e6298f29
@ -333,7 +333,11 @@ func (input *BeegoInput) Query(key string) string {
|
||||
return val
|
||||
}
|
||||
if input.Context.Request.Form == nil {
|
||||
input.Context.Request.ParseForm()
|
||||
input.dataLock.Lock()
|
||||
defer input.dataLock.Unlock()
|
||||
if input.Context.Request.Form == nil {
|
||||
input.Context.Request.ParseForm()
|
||||
}
|
||||
}
|
||||
return input.Context.Request.Form.Get(key)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user