summary refs log tree commit diff stats
path: root/lib/pure/httpclient.nim
diff options
context:
space:
mode:
authorrku <rokups@zoho.com>2015-08-20 17:54:55 +0300
committerrku <rokups@zoho.com>2015-08-20 17:54:55 +0300
commit24ad2cb39247039c50db1b0a8633d00130814fda (patch)
tree73c821c1c4e1d5b8a80cccb7324fa77aca191cb2 /lib/pure/httpclient.nim
parent6a7a44bbf248fad96ed0eed115e3b3c77a77bf89 (diff)
parent69b32637b1f12000b64fa4db452323dc30b3567f (diff)
downloadNim-24ad2cb39247039c50db1b0a8633d00130814fda.tar.gz
Merge branch 'devel' into coroutines
Diffstat (limited to 'lib/pure/httpclient.nim')
-rw-r--r--lib/pure/httpclient.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pure/httpclient.nim b/lib/pure/httpclient.nim
index e6b8088c5..98687359b 100644
--- a/lib/pure/httpclient.nim
+++ b/lib/pure/httpclient.nim
@@ -402,7 +402,7 @@ proc request*(url: string, httpMethod: string, extraHeaders = "",
 
   headers.add(" HTTP/1.1\c\L")
 
-  add(headers, "Host: " & r.hostname & "\c\L")
+  add(headers, "Host: " & parseUri(url).hostname & "\c\L")
   if userAgent != "":
     add(headers, "User-Agent: " & userAgent & "\c\L")
   if proxy != nil and proxy.auth != "":