Explorar o código

Use standard library for retrieving header (#1081)

Dan Markham %!s(int64=8) %!d(string=hai) anos
pai
achega
b9686e91fa
Modificáronse 1 ficheiros con 1 adicións e 4 borrados
  1. 1 4
      context.go

+ 1 - 4
context.go

@@ -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 values[0]
-	}
-	return ""
+	return c.Request.Header.Get(key)
 }
 }
 
 
 /************************************/
 /************************************/