ID:270354
 
I'm not quite sure where this fits, as it's not a BYOND bug and there's no buggy code, so I guess this forum works well for it.

I've got a proc that sends out a request to a webserver every five minutes or so;

proc
Wiznet_updateStatus()
if(world.port)
server["wiz_connectivity"]--
Wiznet_export("{Don't need anyone seeing this part, it's just a standard list of parameters anyways}")

Wiznet_export(str)
if(!world.address || !world.port) return 0
spawn(1) . = world.Export("http://iconultima.tibbius.com/wiznet/?server_address=[world.address]&server_port=[world.port]&server_host=[server["host"]]&[str]")


Typically the export causes a runtime error saying "Server returned unexpected status: 302 Found", and I was wondering if anyone could tell me why it keeps doing that.
It's because the webserver is saying that the file's been moved temporarily, and giving the location to find it at. (http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html) If you try going to that URL in your browser, you'll see how it redirects.

It's kind of a lack of a BYOND feature. It'd be nice if BYOND could automatically look at any of the redirect-related status codes, and look for whatever at the redirected url.
In response to Jon88 (#1)
...caused by using the subdomain inline with the rest of the URL? If it'll stop the 302 status error until statuses can be handled manually, I'll use www.tibbius.com/iconultima.