This commit is contained in:
Fred Beckhusen
2015-08-07 15:34:30 -05:00
parent ce47ec2f3e
commit fde850293c
8080 changed files with 0 additions and 2443112 deletions

View File

@@ -1,3 +0,0 @@
<Solution name="WebServing_Prim">
<Project name="WebServing_Prim" path="WebServing_Prim\WebServing_Prim.prj" active="true"/>
</Solution>

View File

@@ -1,150 +0,0 @@
// :CATEGORY:Viewer 2
// :NAME:WebServing_Prim
// :AUTHOR:Tali Rosca
// :CREATED:2010-09-02 11:41:02.473
// :EDITED:2013-09-18 15:39:09
// :ID:970
// :NUM:1392
// :REV:1.0
// :WORLD:Second Life
// :DESCRIPTION:
// This is an extention of the Bootstrapping HTML on a prim idea.
// :CODE:
list pages;
list content;
integer indexPage = 0;
key url_request;
string baseUrl;
loadPages()
{
// Could be loaded from notecard, and/or possibly fetched from storage prims through link messages:
// For now, the links are a little cumbersome to write, requiring the full javascript: notation.
// (Remember to escape the single-quotes since the pages will be merged into a JavaScript string.)
// This could obviously be made prettier with some string pre-processing, and likewise, a system for
// variable includes, <% %>-style, could be programmed. For now, though, just serve HTML pages.
pages = [];
content = [];
pages += "index";
content += "<ul><li><a href=\"javascript:l(\\'page1\\')\">Page 1</a></li><li><a href=\"javascript:l(\\'page2\\')\">Page 2</a></li></ul>";
pages += "page1";
content += "<h1>Page 1</h1><p>This is page 1.<br/><a href=\"javascript:l(\\'\\')\">Return to the index</a></p>";
pages += "page2";
content += "<h1>Page 2</h1><p>And this is page 2.<br/><a href=\"javascript:l(\\'\\')\">Return to the index</a></p>";
pages += "css";
content += "body {font-family:Verdana,Arial;font-size:12px;margin:8px;padding:0px;color: #000000;}a {font-weight: bold;text-decoration: none;color: #880000;}a:hover {color: #ee5555;}h1 {float: left;padding-right: 50px;margin-top: 0px;margin-bottom: 10px;font-size: 20px;border-bottom: 1px solid;}p {clear:both}";
}
// Default state is responsible for getting the URL, running a timer until it manages to get one.
default
{
state_entry()
{
loadPages();
if (llGetFreeURLs()<1)
llOwnerSay("No URLs available. Something else is using a lot of URLs.");
else
{
// Defensively releasing. Should be a no-op, but prevents a leak if we somehow get here while the server doesn't think it has released.
llReleaseURL(baseUrl);
url_request = llRequestURL();
}
llSetTimerEvent(60);
}
http_request(key id, string method, string body)
{
// We need the URL, so only register success, and let the timer retry otherwise:
if (url_request == id && method == URL_REQUEST_GRANTED)
{
url_request = "";
baseUrl = body;
state running;
}
}
timer()
{
llReleaseURL(baseUrl);
url_request = llRequestURL();
}
state_exit()
{
llSetTimerEvent(0);

View File

@@ -1,7 +0,0 @@
vti_encoding:SR|utf8-nl
vti_timelastmodified:TR|08 Sep 2013 03:49:09 -0000
vti_extenderversion:SR|12.0.0.6211
vti_backlinkinfo:VX|
vti_author:SR|alien\\fred
vti_modifiedby:SR|alien\\fred
vti_timecreated:TR|18 Sep 2013 20:39:09 -0000

View File

@@ -1,6 +0,0 @@
<Project name="WebServing_Prim" guid="D86373EC-6C00-1014-B904-200204C60A89">
<Object name="Object" guid="D86374CA-6C00-1014-B904-200204C60A89">
<Script name="WebServing_Prim_1.lsl" guid="D863B075-6C00-1014-B904-200204C60A89">
</Script>
</Object>
</Project>

View File

@@ -1,6 +0,0 @@
vti_encoding:SR|utf8-nl
vti_timelastmodified:TR|17 Aug 2013 23:32:37 -0000
vti_extenderversion:SR|12.0.0.0
vti_cacheddtm:TX|17 Aug 2013 23:32:37 -0000
vti_filesize:IR|269
vti_backlinkinfo:VX|

View File

@@ -1,6 +0,0 @@
vti_encoding:SR|utf8-nl
vti_timelastmodified:TR|17 Aug 2013 23:32:37 -0000
vti_extenderversion:SR|12.0.0.0
vti_cacheddtm:TX|17 Aug 2013 23:32:37 -0000
vti_filesize:IR|140
vti_backlinkinfo:VX|