From 92e0c90163c4cd3cb7275de319ebeedb1916980c Mon Sep 17 00:00:00 2001 From: Dan Markham Date: Fri, 25 Aug 2017 10:18:40 -0700 Subject: [PATCH] Use standard libray for retrieving header --- context.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/context.go b/context.go index 497cbfd6..6f2b0053 100644 --- a/context.go +++ b/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) } /************************************/