Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Very strange llHttpRequest behaviour

Merlin Alphabeta
Registered User
Join date: 12 Feb 2006
Posts: 83
07-06-2006 08:33
I've got a low-lag, one-shot llHttpRequest script. When I run it in most sims, it runs fine. When I run it in my home sim, it never appears (not even once) to get a response.

My home sim is bowfin. If some people could check out this script I'd really appreciate it - how do I log a defect with linden labs? I thought about grabbing in world help and trying to get them to look at it, but thought there might be a better way to do it...

You should be able to rez this thing, touch it, and watch it die when it gets a response back. This script doesn't work, not even once, in bowfin. The two or three other sims I've ran it in had no problems

Does anyone have any thoughts? AFAIK this behaviour doesn't fit the HTTP throttle, unless there's someone in my sim that keeps the whole region throttled continuously... I think its a bug but I don't really know what to do next...

CODE

string serveraddress= "http://paintupthesky.com/CoinHunt/CoinHunt.aspx";

key httpQuery = NULL_KEY;
string httpResponse;

MerlinHTTPSoapQuery(string url, string operation, list parameters, string xmlns, string responseNode) {
if(xmlns == "") {
xmlns = url;
}
if(responseNode == "") {
responseNode = url + "Response";
}
httpResponse = responseNode;
string body;

body = "op=" + operation;

integer i;
for(i=0; i<llGetListLength(parameters); i += 2) {
if(body != "")
body += "&";
body += llList2String(parameters, i) + "=" + llList2String(parameters, i + 1);
}

//if SL ever supports custom headers, I could make a SOAP call here...
httpQuery = llHTTPRequest(url, [ HTTP_METHOD, "POST", HTTP_MIMETYPE, "application/x-www-form-urlencoded" ], body);
}

default
{
on_rez(integer num) {
llSetRot(llEuler2Rot(<0, 90, 0>));
llTargetOmega(<0, 0, 1.0>, 6.0, 0.5);
}

state_entry() {
llSetRot(llEuler2Rot(<0, 90, 0>));
llTargetOmega(<0, 0, 1.0>, 6.0, 0.5);
}

http_response(key request_id, integer status, list metadata, string body) {
llDie();
}

touch_start(integer num_detected) {
llSay(0, "Sending info to server - I should die soon");
MerlinHTTPSoapQuery(serveraddress, "test", [], "", "");
}

}
Mark Barrett
SLbuzz.com Curator
Join date: 13 Mar 2006
Posts: 27
07-06-2006 18:53
I created a box and put your script it, saved it, exited edit mode, touched it, and it worked. tried it at my home in huin and went to bowfin to try it there -- same thing. do you still have problems with it? where exactly are you at? maybe it's just your land or something. IM me and i'll try it from your place.
_____________________
Rodrick Harrington
Registered User
Join date: 9 Jul 2005
Posts: 150
07-06-2006 21:12
do you have access to the server logs? possible that it's having trouble for some reason with that particular sim's ip or something. At least that'd tell you if the server got the request or if it never made it out of 2L.
_____________________