Skip to content

Commit b7c39df

Browse files
committed
fix cookie get issue
1 parent 1d082d9 commit b7c39df

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

context.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,8 @@ func (ctx *Context) GetCookie(name string) string {
297297
if err != nil {
298298
return ""
299299
}
300-
return cookie.Value
300+
val, _ := url.QueryUnescape(cookie.Value)
301+
return val
301302
}
302303

303304
// GetCookieInt returns cookie result in int type.

macaron.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import (
2929
"github.com/Unknwon/macaron/inject"
3030
)
3131

32-
const _VERSION = "0.4.9.1228"
32+
const _VERSION = "0.4.9.1229"
3333

3434
func Version() string {
3535
return _VERSION

0 commit comments

Comments
 (0)