Author Topic: TCP Objects Help [solved]  (Read 2802 times)

I really need a reliable file downloader, that at very least can download zipped files for everyone, preferably works for images aswell (already know content length)

Someone was trying to use dropbox in the past I think and it tends to give problems for some reason. Try media fire?

I found another solution for this - send a Accept-Encoding: identity and a Connection: Close header
I forgot to say what the point of that is, it makes the server not chunk / compress the output and instead end the connection when the download is complete.


Someone was trying to use dropbox in the past I think and it tends to give problems for some reason. Try media fire?
I was using dropbox completely fine.
you can find the code in update.cs from my old gui mod:
https://dl.dropboxusercontent.com/u/143512782/ZGUI/Client_ZGUI.zip

Also, be sure to not connect over https - torkscript can't handle that

I don't know if this will actually help, but try sending your HTTP version as 1.0 instead of 1.1. Sometimes servers do fancy things with HTTP 1.1 that makes basic parsing like this more difficult.

I don't know if this will actually help, but try sending your HTTP version as 1.0 instead of 1.1. Sometimes servers do fancy things with HTTP 1.1 that makes basic parsing like this more difficult.
ya I originally did it with 1.0 but it didn't make a difference, I heard 1.1 is faster
anyway I'll try to adapt my code to be more like zeblote's later
thanks for help will post again if I need more assistance

bump I have found out the issue but don't know how to fix it, after looking through the people who can't download using my downloader it appears that only the first 3 digits of the content length are coming through, any idea how to fix this?
scratch that, they seem to be random 3 digit content lengths that are the same for each file, but for some people the content length's are normal and work fine

Edit: I'm pretty sure I fixed it I did put an the first \r in this line:
%this.send("GET" SPC %this.dir SPC "HTTP/1.0\nHost:" SPC %this.server @ "\r\n\r\n");
it should look like
%this.send("GET" SPC %this.dir SPC "HTTP/1.0\r\nHost:" SPC %this.server @ "\r\n\r\n");
« Last Edit: August 22, 2013, 09:02:10 PM by swollow »