04-03-2005, 04:24 PM
I was tearing my hair out as to why the server I tried to connect to with the sdl_net example (net_httpget.bas) seemed to ignore the header totally, and I found that the NEWLINE constant was defined wrongly.
It says:
When in fact the correct way is
Small bug, but very anoying. I dunno if this has already been fixed in the cvs.
Also, to support subdomains with newer servers, a "Host: " field should be added to the header:
It says:
Code:
const NEWLINE = "\n\r"
When in fact the correct way is
Code:
const NEWLINE = "\r\n"
Small bug, but very anoying. I dunno if this has already been fixed in the cvs.
Also, to support subdomains with newer servers, a "Host: " field should be added to the header:
Code:
sendBuffer = "GET /" + path + " HTTP/1.0" + NEWLINE + _
"Host: " + hostname + NEWLINE + _
...
url=http://www.copy-pasta.com]CopyPasta[/url] - FilePasta