189df128 by astaxie

fix #87

1 parent 8807c327
...@@ -262,7 +262,7 @@ func (c *Controller) GetString(key string) string { ...@@ -262,7 +262,7 @@ func (c *Controller) GetString(key string) string {
262 } 262 }
263 263
264 func (c *Controller) GetStrings(key string) []string { 264 func (c *Controller) GetStrings(key string) []string {
265 r := c.Ctx.Request; 265 r := c.Ctx.Request
266 if r.Form == nil { 266 if r.Form == nil {
267 return []string{} 267 return []string{}
268 } 268 }
...@@ -327,3 +327,7 @@ func (c *Controller) DelSession(name interface{}) { ...@@ -327,3 +327,7 @@ func (c *Controller) DelSession(name interface{}) {
327 } 327 }
328 c.CruSession.Delete(name) 328 c.CruSession.Delete(name)
329 } 329 }
330
331 func (c *Controller) IsAjax() bool {
332 return (c.Ctx.Request.Header.Get("HTTP_X_REQUESTED_WITH") == "XMLHttpRequest")
333 }
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!