mirror of
https://github.com/astaxie/beego.git
synced 2024-11-19 06:00:55 +00:00
beego: support other analisys & fix typo
This commit is contained in:
parent
b2bd829d39
commit
b2a69f505c
@ -152,7 +152,7 @@ func (input *BeegoInput) IsWebsocket() bool {
|
|||||||
|
|
||||||
// IsSecure returns boolean of whether file uploads in this request or not..
|
// IsSecure returns boolean of whether file uploads in this request or not..
|
||||||
func (input *BeegoInput) IsUpload() bool {
|
func (input *BeegoInput) IsUpload() bool {
|
||||||
return input.Header("Content-Type") == "multipart/form-data"
|
return strings.Contains(input.Header("Content-Type"), "multipart/form-data")
|
||||||
}
|
}
|
||||||
|
|
||||||
// IP returns request client ip.
|
// IP returns request client ip.
|
||||||
|
@ -556,7 +556,7 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
|
|||||||
goto Admin
|
goto Admin
|
||||||
}
|
}
|
||||||
|
|
||||||
if context.Input.IsPost() {
|
if !context.Input.IsGet() && !context.Input.IsHead() {
|
||||||
if CopyRequestBody && !context.Input.IsUpload() {
|
if CopyRequestBody && !context.Input.IsUpload() {
|
||||||
context.Input.CopyBody()
|
context.Input.CopyBody()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user