mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 03:30:57 +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
|
return val
|
||||||
}
|
}
|
||||||
if input.Context.Request.Form == nil {
|
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)
|
return input.Context.Request.Form.Get(key)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user