11-04-2009 17:24
(Sorry if this is a duplicate thread)

For the last couple of days I have not been able to communicate with my off world web services. It was working fine up until then does anyone have any suggestions?
FYI: no changes were made to the code on the web services side.

CODE SNIPPETS:
.
.
.
// process request list into url encoded query string
string getPostString(list request){
integer request_length = llGetListLength(request);
integer index = 0;
string output = "";
for (index = 0;index < request_length;index += 2){
list parts = llList2List(request, index, index + 1);
$output += llList2String(parts,0) + "=" + llEscapeURL(llList2String(parts,1)) + "&";
//llOwnerSay(llList2String(parts,0) + "=" + llEscapeURL(llList2String(parts,1)));
}
return $output;
}
.
.
.
// This request is made once every 45 seconds and there is only one object making the request
list request = [
"display_id", (string)display,
"ad_id", (string)ad,
"agents", llDumpList2String(agents, ",";),
"parcel", llDumpList2String(ParcelDetails, ":";),
"owner", (string)llGetOwnerKey(llGetKey())+":"+llKey2Name(llGetOwnerKey(llGetKey())),
"categories", "1,2,3"
];
request = (request=[]) + request + ["hash",signRequest(request)];
tring values = getPostString(request);
llOwnerSay(values);
http = llHTTPRequest(URL, [HTTP_METHOD, "POST",HTTP_MIMETYPE, "application/x-www-form-urlencoded"] ,values);
// REQUEST IS PROPERLY FORMATTED AT THIS POINT
.
.
.
http_response(key id,integer status, list meta, string body)
{
string response;
if(http==id)
{
list response = llParseString2List(body,["\n"],[]);
integer lines = llGetListLength(response);
integer i;
for (i=0; i < lines; i++){
string line = llList2String(response, i);
llOwnerSay(body);
// !!!THE PROBLEM IS THERE'S BUBKISS (aka NOTHING) FOR THE BODY HERE!!!
list parts = llParseString2List(line,["="],[]);
if (llList2String(parts,0) == "display";) {
ad = (key)llList2String(parts,1);
llSetTexture(ad, 0);
}
if (llList2String(parts,0) == "url";) {
list cl_token = llParseString2List(llList2String(parts,1),["|"],[]);
clickURL = llList2String(parts,0);
clickText = llList2String(parts,1);
}
}
}
}

Sincerely Thanks for any help
Tech Takacs