Bug fixes for standard library: httpclient, json, os, parsexml, xmltree, xmlparser, gtk2.

This commit is contained in:
dom96 2011-03-28 22:08:16 +01:00
commit d9232d126e
7 changed files with 43 additions and 12 deletions

View file

@ -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")