summary refs log tree commit diff stats
path: root/lib/pure/httpclient.nim
diff options
context:
space:
mode:
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")