1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 13:30:56 +00:00

add iswebsocket method

This commit is contained in:
astaxie 2013-09-10 17:02:56 +08:00
parent 44f5c208b6
commit da91565354

View File

@ -74,6 +74,10 @@ func (input *BeegoInput) IsSecure() bool {
return input.Scheme() == "https"
}
func (input *BeegoInput) IsWebsocket() bool {
return input.Header("Upgrade") == "websocket"
}
func (input *BeegoInput) IsUpload() bool {
return input.req.MultipartForm != nil
}