This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
TNOMCat's profile picture

Http api

Started by TNOMCat, 15 August 2012 - 04:03 PM
TNOMCat #1
Posted 15 August 2012 - 06:03 PM
Seems like the http.get() is ignoring some parts of the url
for example http://stuff.url.com/cats/cats.html
it will leave out the "stuff" part and return contents of http://url.com/cats/cats.html
cant_delete_account #2
Posted 15 August 2012 - 06:13 PM
Hmm. Don't know if this is a bug or if ComputerCraft just doesn't support subdomains.
ardera #3
Posted 15 August 2012 - 07:04 PM
and in my PC it ignores the php piece too!
Cloudy #4
Posted 15 August 2012 - 10:41 PM
There's nothing in our code that does that. Are you sure the page isn't redirected to another one?

Do you have examples of URLs this happens with?
TNOMCat #5
Posted 16 August 2012 - 06:05 PM
Ok i done some more testing, it appears that it doesnt ignore subdomains, but the problem is in file format bit such as .html or .php etc
causing it to go to a "page not found" page or redirect code
Cloudy #6
Posted 16 August 2012 - 06:27 PM
Well we don't do anything with file extensions - please provide me with examples so we can see what the issue is.

Edit: Real examples please!
TNOMCat #7
Posted 16 August 2012 - 07:07 PM
Ok what im trying to do is read the source from http://tastethetest....tleCommand.html
using a computer, but the computer gets the page not found page source code as it would if you removed the .html part in your browser

In the computer i am using


Tabl = {}
function gets()
Tabl = http.get("http://tastethetest.zxq.net/Files/TurtleCommand.html")
print(Tabl.readAll())
end
while true do
sleep(1)
gets()
end

prints page not found code.
also same result with http://tastethetest.zxq.net
TNOMCat #8
Posted 06 September 2012 - 07:11 PM
any idea why it is doing that?