Skip to content

Commit 1d082d9

Browse files
committed
mirror fix
1 parent 344fc22 commit 1d082d9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

context.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import (
2222
"io/ioutil"
2323
"mime/multipart"
2424
"net/http"
25+
"net/url"
2526
"path"
2627
"path/filepath"
2728
"reflect"
@@ -239,7 +240,7 @@ func (ctx *Context) GetFile(name string) (multipart.File, *multipart.FileHeader,
239240
func (ctx *Context) SetCookie(name string, value string, others ...interface{}) {
240241
cookie := http.Cookie{}
241242
cookie.Name = name
242-
cookie.Value = value
243+
cookie.Value = url.QueryEscape(value)
243244

244245
if len(others) > 0 {
245246
switch v := others[0].(type) {

0 commit comments

Comments
 (0)