mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 14:10:54 +00:00
remove websocket logic because not support handler
This commit is contained in:
parent
2f8a70d548
commit
3db9633ebd
11
router.go
11
router.go
@ -524,7 +524,10 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
|
||||
var routerInfo *controllerInfo
|
||||
|
||||
w := &responseWriter{writer: rw}
|
||||
w.Header().Set("Server", BeegoServerName)
|
||||
|
||||
if RunMode == "dev" {
|
||||
w.Header().Set("Server", BeegoServerName)
|
||||
}
|
||||
|
||||
// init context
|
||||
context := &beecontext.Context{
|
||||
@ -536,10 +539,6 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
|
||||
context.Output.Context = context
|
||||
context.Output.EnableGzip = EnableGzip
|
||||
|
||||
if context.Input.IsWebsocket() {
|
||||
context.ResponseWriter = rw
|
||||
}
|
||||
|
||||
// defined filter function
|
||||
do_filter := func(pos int) (started bool) {
|
||||
if p.enableFilter {
|
||||
@ -702,7 +701,7 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
|
||||
}
|
||||
|
||||
//render template
|
||||
if !w.started && !context.Input.IsWebsocket() {
|
||||
if !w.started {
|
||||
if AutoRender {
|
||||
if err := execController.Render(); err != nil {
|
||||
panic(err)
|
||||
|
Loading…
Reference in New Issue
Block a user