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
a88750d2
authored
2013-09-10 17:56:06 +0800
by
astaxie
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
support websocket
1 parent
da915653
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
router.go
router.go
View file @
a88750d
...
...
@@ -258,6 +258,12 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
Output
:
beecontext
.
NewOutput
(
w
),
}
context
.
Output
.
Context
=
context
if
context
.
Input
.
IsWebsocket
()
{
context
.
ResponseWriter
=
rw
context
.
Output
=
beecontext
.
NewOutput
(
rw
)
}
var
runrouter
*
controllerInfo
var
findrouter
bool
...
...
@@ -516,7 +522,7 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
panic
(
"gotofunc is exists:"
+
gotofunc
)
}
}
if
!
w
.
started
{
if
!
w
.
started
&&
!
context
.
Input
.
IsWebsocket
()
{
if
AutoRender
{
method
=
vc
.
MethodByName
(
"Render"
)
method
.
Call
(
in
)
...
...
@@ -600,7 +606,7 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
method
.
Call
(
in
)
}
}
if
!
w
.
started
{
if
!
w
.
started
&&
!
context
.
Input
.
IsWebsocket
()
{
if
AutoRender
{
method
=
vc
.
MethodByName
(
"Render"
)
method
.
Call
(
in
)
...
...
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