1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 14:20:54 +00:00
This commit is contained in:
ysqi 2016-04-27 22:18:22 +08:00
parent 9e17f518b8
commit 245664010c

View File

@ -132,17 +132,13 @@ func NewManager(provideName, config string) (*Manager, error) {
if cf.EnableSidInHttpHeader {
if cf.SessionNameInHttpHeader == "" {
err = errors.New("SessionNameInHttpHeader is empty")
panic(err)
return nil, err
panic(errors.New("SessionNameInHttpHeader is empty"))
}
strMimeHeader := textproto.CanonicalMIMEHeaderKey(cf.SessionNameInHttpHeader)
if cf.SessionNameInHttpHeader != strMimeHeader {
strErrMsg := "SessionNameInHttpHeader (" + cf.SessionNameInHttpHeader + ") has the wrong format, it should be like this : " + strMimeHeader
err = errors.New(strErrMsg)
panic(err)
return nil, err
panic(errors.New(strErrMsg))
}
}