Commit 3db9633e authored by astaxie's avatar astaxie

remove websocket logic because not support handler

parent 2f8a70d5
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment