Parcourir la source

Use standard library for retrieving header (#1081)

Dan Markham il y a 8 ans
Parent
commit
b9686e91fa
1 fichiers modifiés avec 1 ajouts et 4 suppressions
  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 {
-	if values, _ := c.Request.Header[key]; len(values) > 0 {
-		return values[0]
-	}
-	return ""
+	return c.Request.Header.Get(key)
 }
 
 /************************************/