1
0
mirror of https://github.com/astaxie/beego.git synced 2024-06-24 12:54:13 +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
}