Jump to content
You are about to reply to a thread that has been inactive for 1586 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Posted

I get a 502 alot using the exacat same script.. is this bad gateway

a result of a throttle on the Linden Website?.. any ideas?

it's just a basic request, but seems to work only every so often..

 string URL_RESIDENT = "http://world.secondlife.com/resident/" + (string)llGetOwner() ;  
 http_request_id = llHTTPRequest( URL_RESIDENT ,
   [ HTTP_USER_AGENT, "LSL_Script(Mozilla Compatible)",
     HTTP_METHOD, "GET", 
     HTTP_MIMETYPE, "text/plain",
     HTTP_BODY_MAXLENGTH,16384,
     HTTP_PRAGMA_NO_CACHE,TRUE
    ], ""); 

 

Posted

it seems to work with a 120 sec timer.. i'm wondering if the headers on the site

are relevant?

Keep-Alive timeout=5, max=100

 

hmm

 
Posted

Even my browser keeps getting ERR_CONNECTION_RESET when visiting manually:

https://world.secondlife.com/resident/779e1d56-5500-4e22-940a-cd7b5adddbe0

That said, I'm able to request the same page repeatedly without errors, with this simple script:

default
{
    state_entry()
    {
        string url  = "https://world.secondlife.com/resident/"
                    + "779e1d56-5500-4e22-940a-cd7b5adddbe0";

        llHTTPRequest(url, [], "");
    }

    http_response(key id, integer status, list metadata, string body)
    {
        // Basic debug
        llOwnerSay((string)[
            "STATUS: ", status, "\n",
            "META LENGTH: ", llGetListLength(metadata), "\n",
            "BODY LENGTH: ", llStringLength(body), "\n"
        ]);

        // Quick peek, up to 1024 bytes
        llOwnerSay(llList2CSV(metadata));
        llOwnerSay(body);

        // Get profile picture UUID.
        integer index   = llSubStringIndex(body, "imageid")
                        + llStringLength("imageid\" content=\"");

        string image = llGetSubString(body, index, index + 35);
        llOwnerSay(image);
    }
}

But curiously, I sometimes get status 200 (OK) but the meta/body is empty...

You are about to reply to a thread that has been inactive for 1586 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...