summary refs log tree commit diff stats
path: root/lib/pure/httpclient.nim
diff options
context:
space:
mode:
authordom96 <dominikpicheta@googlemail.com>2011-03-28 22:08:16 +0100
committerdom96 <dominikpicheta@googlemail.com>2011-03-28 22:08:16 +0100
commitd9232d126eae4169d2c2200a77f3521ceb47b50b (patch)
tree40595f798f34d370eb6fc76a0b45f724e62a22df /lib/pure/httpclient.nim
parentdc669155e39007f1b584eef247dff90523f836bf (diff)
downloadNim-d9232d126eae4169d2c2200a77f3521ceb47b50b.tar.gz
Bug fixes for standard library: httpclient, json, os, parsexml, xmltree, xmlparser, gtk2.
Diffstat (limited to 'lib/pure/httpclient.nim')
-rwxr-xr-xlib/pure/httpclient.nim5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/pure/httpclient.nim b/lib/pure/httpclient.nim
index 092d8e5c6..39ceb5f68 100755
--- a/lib/pure/httpclient.nim
+++ b/lib/pure/httpclient.nim
@@ -237,10 +237,7 @@ proc request*(url: string, httpMethod = httpGET, extraHeaders = "",
   var r = parseUrl(url)
   
   var headers = copy($httpMethod, len("http"))
-  if r.path != "":
-    headers.add(" /" & r.path & r.query)
-  else:
-    headers.add(" /")
+  headers.add(" /" & r.path & r.query)
   headers.add(" HTTP/1.1\c\L")
   
   add(headers, "Host: " & r.hostname & "\c\L")