From c55fea6a03a7a119c9d99f04c1e4e371bfab03cc Mon Sep 17 00:00:00 2001 From: anger Date: Mon, 23 May 2016 02:05:38 +0300 Subject: [PATCH] Fix endless loop --- engine/fasthttp/header.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/fasthttp/header.go b/engine/fasthttp/header.go index 9e88d266..4f8a2899 100644 --- a/engine/fasthttp/header.go +++ b/engine/fasthttp/header.go @@ -49,7 +49,7 @@ func (h *RequestHeader) Keys() (keys []string) { // Contains implements `engine.Header#Contains` function. func (h *RequestHeader) Contains(key string) bool { - return h.Contains(key) + return h.Peek(key) != nil } func (h *RequestHeader) reset(hdr *fasthttp.RequestHeader) { @@ -89,7 +89,7 @@ func (h *ResponseHeader) Keys() (keys []string) { // Contains implements `engine.Header#Contains` function. func (h *ResponseHeader) Contains(key string) bool { - return h.Contains(key) + return h.Peek(key) != nil } func (h *ResponseHeader) reset(hdr *fasthttp.ResponseHeader) {