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
1858f307
authored
2014-07-16 23:05:38 +0800
by
astaxie
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
session: fix #688
1 parent
e6d6419a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
17 deletions
session/couchbase/sess_couchbase.go
session/memcache/sess_memcache.go
session/redis/sess_redis.go
session/couchbase/sess_couchbase.go
View file @
1858f30
...
...
@@ -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 @
1858f30
...
...
@@ -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 @
1858f30
...
...
@@ -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
...
...
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