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
4a3d32dc
authored
2013-09-22 11:43:22 +0800
by
astaxie
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
support auto get session from input fix #211
1 parent
048be29f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletions
controller.go
router.go
controller.go
View file @
4a3d32d
...
...
@@ -270,7 +270,7 @@ func (c *Controller) SaveToFile(fromfile, tofile string) error {
func
(
c
*
Controller
)
StartSession
()
session
.
SessionStore
{
if
c
.
CruSession
==
nil
{
c
.
CruSession
=
GlobalSessions
.
SessionStart
(
c
.
Ctx
.
ResponseWriter
,
c
.
Ctx
.
Request
)
c
.
CruSession
=
c
.
Ctx
.
Input
.
CruSession
}
return
c
.
CruSession
}
...
...
router.go
View file @
4a3d32d
...
...
@@ -306,6 +306,10 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
context
.
Output
=
beecontext
.
NewOutput
(
rw
)
}
if
SessionOn
{
context
.
Input
.
CruSession
=
GlobalSessions
.
SessionStart
(
w
,
r
)
}
var
runrouter
*
controllerInfo
var
findrouter
bool
...
...
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