From d20ea47390b640298110478378c7b10058a61923 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Musab=20G=C3=BCltekin?= Date: Sat, 22 Jun 2019 15:04:08 +0300 Subject: [PATCH] Fix Header convertion bug. Map was not canonicalizing keys --- http/http.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/http/http.go b/http/http.go index 76ec8f1..24427dd 100644 --- a/http/http.go +++ b/http/http.go @@ -85,9 +85,9 @@ func ConvertHeaderToMap(header http.Header) map[string]interface{} { // ConvertMapToHeader converts map[string]interface{} to http.Header func ConvertMapToHeader(m map[string]interface{}) http.Header { - header := make(map[string][]string) + header := http.Header{} for k, v := range m { - header[k] = []string{v.(string)} + header.Set(k, v.(string)) } return header }