Blockland Forums > Modification Help

TCPObject GET requests

Pages: << < (3/10) > >>

Nexus:


--- Quote from: Brian Smithers on March 07, 2012, 09:28:13 PM ---try that

--- End quote ---

That was the first thing I tried.

Problem:  I cannot connect to the ip address directly, it HAS to be through the /shares/ url, otherwise it is a 401 unauthorized
I do not think httpobjects have the ability to connect to the /shares/ url

And your code assumes that the data being returned is direct text, and not a download.  I'm still unsure how to handle that.

Brian Smithers:


--- Quote from: Nexus on March 07, 2012, 10:14:41 PM ---That was the first thing I tried.

Problem:  I cannot connect to the ip address directly, it HAS to be through the /shares/ url, otherwise it is a 401 unauthorized
I do not think httpobjects have the ability to connect to the /shares/ url

And your code assumes that the data being returned is direct text, and not a download.  I'm still unsure how to handle that.

--- End quote ---
Support_Downloader.cs
In BlockOS

Port:


--- Quote from: Nexus on March 07, 2012, 10:14:41 PM ---Problem:  I cannot connect to the ip address directly, it HAS to be through the /shares/ url, otherwise it is a 401 unauthorized
I do not think httpobjects have the ability to connect to the /shares/ url

--- End quote ---

It is absolutely impossible to "connect" to a path on a remote server. If it seems to the user this way, the server may be checking certain headers such as Referrer and Host in order to find some verification details. Some more information about the server software you're trying to interface with may help further, too.

EDIT: After some research, I've gotten to the conclusion that "connecting through" the /shares URL (which is absolutely impossible) is not necessary to fetch the file. Your issue is elsewhere.

Nexus:


--- Quote from: Port on March 08, 2012, 02:26:03 AM ---It is absolutely impossible to "connect" to a path on a remote server. If it seems to the user this way, the server may be checking certain headers such as Referrer and Host in order to find some verification details. Some more information about the server software you're trying to interface with may help further, too.

EDIT: After some research, I've gotten to the conclusion that "connecting through" the /shares URL (which is absolutely impossible) is not necessary to fetch the file. Your issue is elsewhere.

--- End quote ---

My hunch is that it has something to do with how clicking the link wont just display the text throuhg the internet, but will instead send you a download save/open thing.  I have no idea how to handle that, because Brian's BlockOS downloader still has the same problem.

Destiny/Zack0Wack0:


--- Quote from: Nexus on March 08, 2012, 07:50:32 AM ---My hunch is that it has something to do with how clicking the link wont just display the text throuhg the internet, but will instead send you a download save/open thing.  I have no idea how to handle that, because Brian's BlockOS downloader still has the same problem.

--- End quote ---
Your web server is incorrectly serving MIME types and not recognizing the .txt file as a form of plain text, hence it sends it as a binary stream. Not sure why it's giving you an auth error when I can expect the site just fine and all of it's headers seem to be fine. I'm going to guess that it might have to do with the headers Torque is sending it, possibly the Torque user-agent or lack of it.

Pages: << < (3/10) > >>

Go to full version