Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
beego
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
beego
Commits
9d0798ed
Commit
9d0798ed
authored
Jul 17, 2014
by
fuxiaohei
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
https://github.com/astaxie/beego
into develop
parents
e52386b5
1858f307
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
18 deletions
+4
-18
sess_couchbase.go
session/couchbase/sess_couchbase.go
+0
-6
sess_memcache.go
session/memcache/sess_memcache.go
+0
-5
sess_redis.go
session/redis/sess_redis.go
+0
-6
staticfile.go
staticfile.go
+4
-1
No files found.
session/couchbase/sess_couchbase.go
View file @
9d0798ed
...
...
@@ -75,12 +75,6 @@ func (cs *CouchbaseSessionStore) SessionID() string {
func
(
cs
*
CouchbaseSessionStore
)
SessionRelease
(
w
http
.
ResponseWriter
)
{
defer
cs
.
b
.
Close
()
// if rs.values is empty, return directly
if
len
(
cs
.
values
)
<
1
{
cs
.
b
.
Delete
(
cs
.
sid
)
return
}
bo
,
err
:=
session
.
EncodeGob
(
cs
.
values
)
if
err
!=
nil
{
return
...
...
session/memcache/sess_memcache.go
View file @
9d0798ed
...
...
@@ -72,11 +72,6 @@ func (rs *MemcacheSessionStore) SessionID() string {
// save session values to redis
func
(
rs
*
MemcacheSessionStore
)
SessionRelease
(
w
http
.
ResponseWriter
)
{
defer
rs
.
c
.
Close
()
// if rs.values is empty, return directly
if
len
(
rs
.
values
)
<
1
{
rs
.
c
.
Delete
(
rs
.
sid
)
return
}
b
,
err
:=
session
.
EncodeGob
(
rs
.
values
)
if
err
!=
nil
{
...
...
session/redis/sess_redis.go
View file @
9d0798ed
...
...
@@ -81,12 +81,6 @@ func (rs *RedisSessionStore) SessionRelease(w http.ResponseWriter) {
c
:=
rs
.
p
.
Get
()
defer
c
.
Close
()
// if rs.values is empty, return directly
if
len
(
rs
.
values
)
<
1
{
c
.
Do
(
"DEL"
,
rs
.
sid
)
return
}
b
,
err
:=
session
.
EncodeGob
(
rs
.
values
)
if
err
!=
nil
{
return
...
...
staticfile.go
View file @
9d0798ed
...
...
@@ -27,11 +27,14 @@ func serverStaticRouter(ctx *context.Context) {
if
len
(
prefix
)
==
0
{
continue
}
if
requestPath
==
"/favicon.ico"
{
if
requestPath
==
"/favicon.ico"
||
requestPath
==
"/robots.txt"
{
file
:=
path
.
Join
(
staticDir
,
requestPath
)
if
utils
.
FileExists
(
file
)
{
http
.
ServeFile
(
ctx
.
ResponseWriter
,
ctx
.
Request
,
file
)
return
}
else
{
http
.
NotFound
(
ctx
.
ResponseWriter
,
ctx
.
Request
)
return
}
}
if
strings
.
HasPrefix
(
requestPath
,
prefix
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment