
| Key: |
SVC-4898
|
| Type: |
Bug
|
| Status: |
Open
|
| Priority: |
Normal
|
| Assignee: |
Unassigned
|
| Reporter: |
Solo Mornington
|
| Votes: |
0
|
| Watchers: |
0
|
|
If you were logged in you would be able to see more operations.
|
|
|
Rez a prim. Put the following script into it. It will tell you a URL. Put the URL in your web browser and get back 'Hello world!'
Move the prim across a sim boundary. The changed event will cause it to request another URL, but none is forthcoming. Note that llGetFreeURLs() returns 0, even though there are URLs available.
Reset the script. The script will still report 0 URLs available, and the request for a URL will fail.
Repeat the whole thing over again, this time touching the prim before moving it across the boundary (causing it to release its URL). After crossing the boundary, the script can't request a new URL.
Similarly, no script in that prim will be able to request a URL. Delete the script and replace it with a fresh one, and it won't be able to request a URL. The prim is locked out of the URL process.
The script is just a few additions to the sample code on the wiki:
string gURL;
default
{
state_entry()
{
llSay(0,"URL pool count: " + (string)llGetFreeURLs());
llRequestURL();
}
changed(integer c)
{
if (c & (CHANGED_REGION | CHANGED_REGION_START | CHANGED_TELEPORT))
{
llReleaseURL(gURL);
llSay(0,"URL pool count: " + (string)llGetFreeURLs());
llRequestURL();
}
}
touch_start(integer foo)
{
llReleaseURL(gURL);
}
http_request(key id, string method, string body)
{
if (method == URL_REQUEST_GRANTED)
{
gURL = body;
llSay(0,"URL: " + gURL);
}
else if (method == URL_REQUEST_DENIED)
{
llSay(0, "Something went wrong, no url. " + body);
}
else if (method == "GET")
{
llHTTPResponse(id,200,"Hello World!");
}
else
{
llHTTPResponse(id,405,"Unsupported Method");
}
}
}
|
|
Description
|
Rez a prim. Put the following script into it. It will tell you a URL. Put the URL in your web browser and get back 'Hello world!'
Move the prim across a sim boundary. The changed event will cause it to request another URL, but none is forthcoming. Note that llGetFreeURLs() returns 0, even though there are URLs available.
Reset the script. The script will still report 0 URLs available, and the request for a URL will fail.
Repeat the whole thing over again, this time touching the prim before moving it across the boundary (causing it to release its URL). After crossing the boundary, the script can't request a new URL.
Similarly, no script in that prim will be able to request a URL. Delete the script and replace it with a fresh one, and it won't be able to request a URL. The prim is locked out of the URL process.
The script is just a few additions to the sample code on the wiki:
string gURL;
default
{
state_entry()
{
llSay(0,"URL pool count: " + (string)llGetFreeURLs());
llRequestURL();
}
changed(integer c)
{
if (c & (CHANGED_REGION | CHANGED_REGION_START | CHANGED_TELEPORT))
{
llReleaseURL(gURL);
llSay(0,"URL pool count: " + (string)llGetFreeURLs());
llRequestURL();
}
}
touch_start(integer foo)
{
llReleaseURL(gURL);
}
http_request(key id, string method, string body)
{
if (method == URL_REQUEST_GRANTED)
{
gURL = body;
llSay(0,"URL: " + gURL);
}
else if (method == URL_REQUEST_DENIED)
{
llSay(0, "Something went wrong, no url. " + body);
}
else if (method == "GET")
{
llHTTPResponse(id,200,"Hello World!");
}
else
{
llHTTPResponse(id,405,"Unsupported Method");
}
}
}
|
Show » |
made changes - 07/Oct/09 11:43 AM
| Field |
Original Value |
New Value |
|
Link
|
|
This issue Relates to SVC-1086
[ SVC-1086
]
|
made changes - 07/Oct/09 12:13 PM
|
Link
|
|
This issue Relates to SVC-4871
[ SVC-4871
]
|
made changes - 09/Oct/09 06:02 AM
|
Link
|
|
This issue duplicates SVC-4871
[ SVC-4871
]
|
made changes - 13/Oct/09 11:58 AM
|
Link
|
|
This issue Relates to SVC-4791
[ SVC-4791
]
|
|