Use standard library for retrieving header (#1081)

This commit is contained in:
Dan Markham 2017-08-25 21:53:27 -07:00 committed by Bo-Yi Wu
parent 18b7c0892d
commit b9686e91fa
1 changed files with 1 additions and 4 deletions

View File

@ -537,10 +537,7 @@ func (c *Context) IsWebsocket() bool {
} }
func (c *Context) requestHeader(key string) string { func (c *Context) requestHeader(key string) string {
if values, _ := c.Request.Header[key]; len(values) > 0 { return c.Request.Header.Get(key)
return values[0]
}
return ""
} }
/************************************/ /************************************/