This commit is contained in:
+6
-1
@@ -11,6 +11,7 @@ import (
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"strings"
|
||||
"net/url"
|
||||
)
|
||||
|
||||
type Application struct {
|
||||
@@ -231,13 +232,17 @@ func (this *Application) handler(w http.ResponseWriter, req *http.Request) {
|
||||
sessionId = cookie.Value
|
||||
}
|
||||
|
||||
unescapeUrl,err:=url.QueryUnescape(req.RequestURI)
|
||||
if err!=nil{
|
||||
unescapeUrl=req.RequestURI
|
||||
}
|
||||
//访问实例
|
||||
context := Context{SessionIns: SessionIns{SessionId: sessionId,
|
||||
LongCache: this.sessionLong,
|
||||
ShortCache: this.sessionShort,
|
||||
},
|
||||
CacheIns: this.CacheIns,
|
||||
Resp: w, Req: req, Application: this, RouterString: s, Config: this.Config, Db: &this.Db, HandlerStr: req.RequestURI}
|
||||
Resp: w, Req: req, Application: this, RouterString: s, Config: this.Config, Db: &this.Db, HandlerStr: unescapeUrl}
|
||||
//header默认设置
|
||||
header := w.Header()
|
||||
header.Set("Content-Type", "text/html; charset=utf-8")
|
||||
|
||||
Reference in New Issue
Block a user