Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
张磊
/
FileStorageBeego
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
3db9633e
authored
2014-06-11 11:12:17 +0800
by
astaxie
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
remove websocket logic because not support handler
1 parent
2f8a70d5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
router.go
router.go
View file @
3db9633
...
...
@@ -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
)
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment