Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug in sdl_net example
#1
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:
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
Reply
#2
Ok, both changes in CVS.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)