summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorDaniil Yarancev <TiberiumN@users.noreply.github.com>2017-04-02 18:52:14 +0300
committerGitHub <noreply@github.com>2017-04-02 18:52:14 +0300
commit009277856ebdb45a28cc136f2eff1b4fbf139ff2 (patch)
treed13a36ae2d7b910e1017101bc1ae00eeae9567de /lib
parent316b680f5d99da056e1ae89b7a2ca0eabc6244f8 (diff)
downloadNim-009277856ebdb45a28cc136f2eff1b4fbf139ff2.tar.gz
Fix #5611
Diffstat (limited to 'lib')
-rw-r--r--lib/pure/httpclient.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pure/httpclient.nim b/lib/pure/httpclient.nim
index 7f666fb35..62c7e2067 100644
--- a/lib/pure/httpclient.nim
+++ b/lib/pure/httpclient.nim
@@ -320,7 +320,7 @@ proc parseResponse(s: Socket, getBody: bool, timeout: int): Response =
       if line[linei] != ':': httpError("invalid headers")
       inc(linei) # Skip :
 
-      result.headers[name] = line[linei.. ^1].strip()
+      result.headers.add(name, line[linei.. ^1].strip())
       # Ensure the server isn't trying to DoS us.
       if result.headers.len > headerLimit:
         httpError("too many headers")
@@ -1010,7 +1010,7 @@ proc parseResponse(client: HttpClient | AsyncHttpClient,
       if line[linei] != ':': httpError("invalid headers")
       inc(linei) # Skip :
 
-      result.headers[name] = line[linei.. ^1].strip()
+      result.headers.add(name, line[linei.. ^1].strip())
       if result.headers.len > headerLimit:
         httpError("too many headers")