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

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

Recommended Posts

9 minutes ago, Qwalyphi Korpov said:

Hmmmm... per the release notes this is being fixed tomorrow.  Would be so helpful to know those little details like the script change that's needed (or is it?).

The Simulator user group meeting is today.
I'll try & remember to ask about this.

http://wiki.secondlife.com/wiki/Simulator_User_Group

 

Link to post
Share on other sites
  • Replies 197
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

Ok ... we're continuing to learn new things ... with the pain that sometimes brings. What follows is going to get a little technical, but bear with me. If you're feeling swamped, skip to the numbered

An update for all SRC receivers is available: Just click [update] under [options] of the boards menu to receive one. Do note that applying the update, while your region is not upgraded to magnu

Hello guys and gals :), SHX creator reporting in! First of all my apologies, due to personal first life stuff i've been not on top of things in Second Life for quite a while. Oz Linden has brou

Posted Images

11 minutes ago, Qwalyphi Korpov said:

Hmmmm... per the release notes this is being fixed tomorrow.  Would be so helpful to know those little details like the script change that's needed (or is it?).

The Simulator user group meeting is today.
I'll try & remember to ask about this.

http://wiki.secondlife.com/wiki/Simulator_User_Group

 

Link to post
Share on other sites

Ok.... I've updated the wiki page for llHTTPRequest to show the parameter that will be available with the new server roll.

If you previously invoked the method like this to hack a User Agent header into the URL parameter:

HTTPRequest=llHTTPRequest(URL + "/7.html HTTP/1.0\nUser-Agent: LSL Script (Mozilla Compatible)\n\n",[],"");

then it won't work on the new version because the spaces and newline are not allowed in the URL (that's actually why it broke in the current Magnum server already).

You'll need to change your script to do something like:

HTTPRequest=llHTTPRequest(URL + "/7.html",[HTTP_USER_AGENT, "Stream-Script/1.0 (Mozilla Compatible)"],"");

The User Agent value you provide will be added to the one provided by the server, so both your script and the server version will be identified.

As has been noted above, this change is scheduled to roll to the Magnum RC regions tomorrow.

  • Like 4
Link to post
Share on other sites

Tried this today and got a 502 result:

[11:37:37] Q Stream Monitor June 14: Response Status:502, ResponseBody:<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html><head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>ERROR: The requested URL could not be retrieved</title> <style type="text/css"><!--   %l  body :lang(fa) { direction: rtl; font-size: 100%; font-family: Tahoma, Roya, sans-serif; float: right; } :lang(he) { direction: rtl; }  --></style> </head><body id=ERR_ZERO_SIZE_OBJECT> <div id="titles"> <h1>ERROR</h1> <h2>The requested URL could not be retrieved</h2> </div> <hr>  <div id="content"> <p>The following error was encountered while trying to retrieve the URL: <a href="http://server3.luschaudio.com:10272/7.html">http://server3.luschaudio.com:10272/7.html</a></p>  <blockquote id="error"> <p><b>Zero Sized Reply</b></p> </blockquote>  <p>Squid did not receive any data for this request.</p>  <p>Your cache administrator is <a href="mailto:webmaster">webmaster</a>.</p> <br> </div>  <hr> <div id="footer"> <p

which looks like:

 

error  on .7html test.PNG

Link to post
Share on other sites
12 minutes ago, Oz Linden said:

It would be more useful to show us your script.

// 7.html gives the following in the body
// 0 -> current listeners
// 1 -> status
// 2 -> listener peak
// 3 -> max listeners
// 4 -> reported listeners
// 5 -> bitrate
// 6 -> song

// v3 - to use new HTTP request parameters

integer DEBUG = FALSE;
string stream = "YOUR STREAM URL";
key kSentRequest;
string URL;
string stream_status;
string listeners;
string song;
integer bit_rate;

default
{
    state_entry()
    {   
        stream = llGetObjectDesc();
        URL = stream;
        llOwnerSay("URL:"+URL);
        //URL = stream + "/7.html HTTP/1.0\nUser-Agent: XML Getter (Mozilla Compatible)\n\n";
        //kSentRequest = llHTTPRequest(URL, [], "");
        kSentRequest = llHTTPRequest(URL + "/7.html",[HTTP_USER_AGENT, "Stream-Script/1.0 (Mozilla Compatible)"],"");
        llSetTimerEvent(10.0);
    }
    touch_start (integer number)
    {
        //kSentRequest = llHTTPRequest(URL, [], "");
        kSentRequest = llHTTPRequest(URL + "/7.html",[HTTP_USER_AGENT, "Stream-Script/1.0 (Mozilla Compatible)"],"");
        // check it
    }
    timer ()
    {
        //kSentRequest = llHTTPRequest(URL, [], "");
        kSentRequest = llHTTPRequest(URL + "/7.html",[HTTP_USER_AGENT, "Stream-Script/1.0 (Mozilla Compatible)"],"");
        if (stream != llGetObjectDesc())
        {
            llResetScript();
        }
    }
    
    http_response (key kRecRequest, integer intStatus, list lstMeta, string strBody)
    {
        if (kRecRequest == kSentRequest)
        {   
            // Strip the html out of the received information and just show what is inbetween the body tags
            llOwnerSay("Status:"+(string)intStatus+", ResponseBody:"+strBody);
            list html = llParseString2List(strBody,["<body>", "</body>"],[]);
            string info = (llList2String(html,1));
            list status = llCSV2List(info);
            listeners = llList2String(status,4);
            integer new_rate = llList2Integer(status,5);
            song = llList2String(status,6);
            //if (song != "") llOwnerSay("song is "+song);
            if (new_rate != bit_rate)
            {
                //if (bit_rate > 0) llOwnerSay("New stream bit rate is "+(string)new_rate+" kbps");
                bit_rate = new_rate;
            }
            stream_status = llList2String(status,1);
            if (stream_status == "1")
            {
                llSetTextureAnim(TRUE | SMOOTH | LOOP, ALL_SIDES,1,1,1.0, 1,0.25);
                llSetColor(<1.0,1.0,1.0>, ALL_SIDES);
                llSetText("Stream is ON with "+listeners+" listeners"+
                  "\nBit Rate is "+(string)bit_rate+" kbps"+
                  "\nSong: "+song,<0.1,0.9,0.1>,0.9);
            } else
            {
                llSetTextureAnim(FALSE | SMOOTH | LOOP, ALL_SIDES,1,1,1.0, 1,0.25);
                llSetColor(<0.3,0.3,0.3>, ALL_SIDES);
                llSetText("Stream is OFF",<0.9,0.1,0.1>,0.9);
            }
            //llSay(0," Current Listeners: " + llList2String(status,0));
            //llSay(0,"Status: " + llList2String(status,1));
            //llSay(0,"listener peak: " + llList2String(status,2));
            //llSay(0,"max listeners: " + llList2String(status,3));
            //llSay(0,"reported listeners: " + llList2String(status,4));
            //llSay(0,"bitrate: " + llList2String(status,5));
            //llSay(0,"Song: " + llList2String(status,6));
            kSentRequest = NULL_KEY;
        }
    }
    on_rez(integer start_param)
    {
        llResetScript();
    }
}

Link to post
Share on other sites

I could get it to compile yesterday on a Magnum region and only got that error on other regions, as expected. So the parameter does exist there, but it still doesn't work, sadly. I didn't check the server response, but it's probably the same issue Qwalyphi Korpov described.

Link to post
Share on other sites

Came and tried my two SHX Boards today and still showing ERROR 499 :( i see OZ's comment above about having to rollback for some rework and just hope we can get a fix soon for this as i also have a SHX Song Voting Board under my SHX Receivers - those are not working also as they depend on the ability of the Receiver to capture the Song Titles...i live in hope that al can be fixed....it is not good that the SHX owner SAI is not available to help with work to restore the functionability of his products !!

Link to post
Share on other sites

The simulator/LSL change is scheduled to roll tomorrow (6/21) to the Magnum RC channel for another try; simulator version 2017-06-19T17:18:00.327192.  Thank you all for your patience.

This release fixes two things that were responsible for the rollback:

  • Our previous change had broken adding custom headers; those should work again
  • We modified the server to properly escape space characters in the url value. Technically, the script should already have done that, but we didn't enforce it before so there are a lot of scripts out there that send them and we could make the change in a backwards-compatible way, so we did.

 

Edited by Oz Linden
  • Like 4
Link to post
Share on other sites

Testing was not successful today. Using the simple script below to access one of two ShoutCast servers I get a 502 response from one and the other gets a 403.

// 7.html gives the following in the body

// 0 -> current listeners

// 1 -> status

// 2 -> listener peak

// 3 -> max listeners

// 4 -> reported listeners

// 5 -> bitrate

// 6 -> song

 

// v3 - to use new HTTP request HTTP_USER_AGENT parameter

 

string stream = "YOUR STREAM URL";

key kSentRequest;

string URL;

string stream_status;

 

default

{

state_entry()

{

stream = "http://37.59.14.77:8352";

stream = "http://server3.luschaudio.com:10272";

URL = stream;

llOwnerSay("URL:"+URL);

}

touch_start (integer number)

{

kSentRequest = llHTTPRequest(URL + "/7.html",[HTTP_USER_AGENT, "Stream-Script/1.0 (Mozilla Compatible)"],"");

}

http_response (key kRecRequest, integer intStatus, list lstMeta, string strBody)

{

if (kRecRequest == kSentRequest)

{

llOwnerSay("Status:"+(string)intStatus+", ResponseBody:"+strBody);

kSentRequest = NULL_KEY;

}

}

}

Location & Server version:

You are at 11.6, 18.5, 21.3 in Morabeza located at sim10094.agni.lindenlab.com (216.82.48.160:13020)

SLURL: http://maps.secondlife.com/secondlife/Morabeza/12/19/21

(global coordinates 199,948.0, 307,987.0, 21.3)

Second Life RC Magnum 17.06.19.327192

Messages below

[08:06:40] Qwalyphi Korpov: .

[08:06:53] Simple Stream Mon V3 June 20: URL:http://server3.luschaudio.com:10272

[08:07:18] Simple Stream Mon V3 June 20: Status:502, ResponseBody:<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html><head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>ERROR: The requested URL could not be retrieved</title> <style type="text/css"><!-- %l body :lang(fa) { direction: rtl; font-size: 100%; font-family: Tahoma, Roya, sans-serif; float: right; } :lang(he) { direction: rtl; } --></style> </head><body id=ERR_ZERO_SIZE_OBJECT> <div id="titles"> <h1>ERROR</h1> <h2>The requested URL could not be retrieved</h2> </div> <hr> <div id="content"> <p>The following error was encountered while trying to retrieve the URL: <a href="http://server3.luschaudio.com:10272/7.html">http://server3.luschaudio.com:10272/7.html</a></p> <blockquote id="error"> <p><b>Zero Sized Reply</b></p> </blockquote> <p>Squid did not receive any data for this request.</p> <p>Your cache administrator is <a href="mailto:webmaster">webmaster</a>.</p> <br> </div> <hr> <div id="footer"> <p>Generate

[08:07:25] Qwalyphi Korpov: .

[08:07:41] Simple Stream Mon V3 June 20: URL:http://37.59.14.77:8352

[08:07:44] Simple Stream Mon V3 June 20: Status:403, ResponseBody:

Link to post
Share on other sites

Hello Oz :-)

I just did see that RC Magnum is updated to 17.06.19.327192. I tried follwowing http requests on several Shout V1, V2 and Icecast Radio stations:

            httpreqstream_id = llHTTPRequest(urlmain + "/7.html",[HTTP_USER_AGENT, "Stream-Script/1.0 (Mozilla Compatible)"],"");
            httpreqstream_id = llHTTPRequest(urlmain + "/stats?sid=" + urlsid,[HTTP_USER_AGENT, "Stream-Script/1.0 (Mozilla Compatible)"],"");
            httpreqstream_id = llHTTPRequest(urlmain + "/status-json.xsl" + urllast,[HTTP_USER_AGENT, "Stream-Script/1.0 (Mozilla Compatible)"],"");
            httpreqstream_id = llHTTPRequest(urlmain + "/status.xsl " + urllast,[HTTP_USER_AGENT, "Stream-Script/1.0 (Mozilla Compatible)"],"");

At all these requests I got back on all of these requests:

body :<html><head><title>Error 404</title></head><body><b>404 - Could not parse XSLT file</b></body></html>

Additional I have the problem that if I try to request with the old syntax the script does not get ANY response back as far I can see..so I can not check if the response is bad and I have to check with the new syntax..any help would be appreciatet

Link to post
Share on other sites
1 hour ago, Emmerich Beeswing said:

Hello Oz :-)

I just did see that RC Magnum is updated to 17.06.19.327192. I tried follwowing http requests on several Shout V1, V2 and Icecast Radio stations:

            httpreqstream_id = llHTTPRequest(urlmain + "/7.html",[HTTP_USER_AGENT, "Stream-Script/1.0 (Mozilla Compatible)"],"");
            httpreqstream_id = llHTTPRequest(urlmain + "/stats?sid=" + urlsid,[HTTP_USER_AGENT, "Stream-Script/1.0 (Mozilla Compatible)"],"");
            httpreqstream_id = llHTTPRequest(urlmain + "/status-json.xsl" + urllast,[HTTP_USER_AGENT, "Stream-Script/1.0 (Mozilla Compatible)"],"");
            httpreqstream_id = llHTTPRequest(urlmain + "/status.xsl " + urllast,[HTTP_USER_AGENT, "Stream-Script/1.0 (Mozilla Compatible)"],"");

At all these requests I got back on all of these requests:

body :<html><head><title>Error 404</title></head><body><b>404 - Could not parse XSLT file</b></body></html>

Additional I have the problem that if I try to request with the old syntax the script does not get ANY response back as far I can see..so I can not check if the response is bad and I have to check with the new syntax..any help would be appreciatet

The old way certainly won't work.  Does this test script with these URLs work on other simulator versions?

When I try those URLs with CURL locally, I get the same results you describe here, so I don't see why they should work from LSL.

Link to post
Share on other sites
You are about to reply to a thread that has been inactive for 230 days.

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...