MantisBT - opensim
View Issue Details
0003948opensim[REGION] Script Functionspublic2009-07-27 21:322010-09-12 10:46
Instant Blue 
melanie 
normalminoralways
closedfixed 
 
master (dev code) 
Grid (Multiple Regions per Sim)
BasicPhysics
.NET / Windows64
None
0003948: 'URL_REQUEST_GRANTED' does not exist
Tried to create scripts from the examples on the second life wiki: http://wiki.secondlife.com/wiki/LSL_http_server/examples [^]

Error CS0103: The name 'URL_REQUEST_GRANTED' does not exist in the current context

default
{
    state_entry()
    {
        llRequestURL();
    }
 
    http_request(key id, string method, string body)
    {
        if (method == URL_REQUEST_GRANTED)
        {
            llSay(0,"URL: " + body);
        }
        else if (method == "GET")
        {
            llHTTPResponse(id,200,"Hello World!");
        }
    }
}


Hippo OpenSim Viewer 0.5.1 (LL 1.22.11) Mar 24 2009 17:47:38 (Hippo Release)
Release Notes

You are at 2558006.5, 2555999.7, 22.0 in Brianreavis located at c-76-100-8-247.hsd1.va.comcast.net (76.100.8.247:9011)
OpenSim 0.6.6 (Dev) .10070 (OS Microsoft Windows NT 6.0.6001 Service Pack 1) ChilTasks:True PhysPrim:True


CPU: Intel Pentium III/Pentium III Xeon (0.25 micron process) with external L2 cache (3177 MHz)
Memory: 4095 MB
OS Version: Microsoft Windows Vista Service Pack 1 (Build 6001)
Graphics Card Vendor: NVIDIA Corporation
Graphics Card: GeForce 9600 GT/PCI/SSE2
OpenGL Version: 2.1.2

libcurl Version: libcurl/7.16.4 OpenSSL/0.9.7c zlib/1.2.3
J2C Decoder Version: KDU
Audio Driver Version: FMOD version 3.740000
LLMozLib Version: [LLMediaImplLLMozLib] - 2.01.25686 (Mozilla GRE version 1.8.1.13_0000000000)
Packets Lost: 1800/113223 (1.6%)
No tags attached.
Issue History
2009-07-27 21:32Instant BlueNew Issue
2009-07-27 21:32Instant BlueSVN Revision => 10070
2009-07-27 21:32Instant BlueRun Mode => Grid (Multiple Regions per Sim)
2009-07-27 21:32Instant BluePhysics Engine => BasicPhysics
2009-07-27 21:32Instant BlueEnvironment => .NET / Windows64
2009-07-27 21:32Instant BlueMono Version => None
2009-07-27 22:03SkelitoNote Added: 0012636
2009-07-27 22:04SkelitoNote Edited: 0012636
2009-07-28 03:27Fly-Man-Note Added: 0012637
2009-07-28 03:27Fly-Man-Note Edited: 0012637
2009-07-28 03:56melanieStatusnew => resolved
2009-07-28 03:56melanieResolutionopen => no change required
2009-07-28 03:56melanieAssigned To => melanie
2009-07-28 03:56melanieNote Added: 0012638
2009-08-16 09:38chi11kenStatusresolved => closed
2009-12-14 15:43NichoVStatusclosed => feedback
2009-12-14 15:43NichoVResolutionno change required => reopened
2009-12-14 15:43NichoVNote Added: 0014495
2009-12-18 05:46Fly-Man-Note Added: 0014535
2010-05-02 17:39melanieStatusfeedback => resolved
2010-05-02 17:39melanieFixed in Version => master (dev code)
2010-05-02 17:39melanieResolutionreopened => fixed
2010-05-02 17:39melanieNote Added: 0015394
2010-09-12 10:46chi11kenStatusresolved => closed

Notes
(0012636)
Skelito   
2009-07-27 22:03   
(edited on: 2009-07-27 22:04)
Always a good idea to check out the LSL_Status/Functions wiki page before making a mantis. This Functions (llRequestURL) is not Implemented yet, meaning that script will always fail.

http://opensimulator.org/wiki/LSL_Status/Functions [^]

(0012637)
Fly-Man-   
2009-07-28 03:27   
Skelito, this is not true ..

The script will work, if you change something:

default
{
    state_entry()
    {
        llRequestURL();
    }
 
    http_request(key id, string method, string body)
    {
        if (method == "URL_REQUEST_GRANTED")

// See the " around it, it's a string now

        {
            llSay(0,"URL: " + body);
        }
        else if (method == "GET")
        {
            llHTTPResponse(id,200,"Hello World!");
        }
    }
}

(0012638)
melanie   
2009-07-28 03:56   
User error
(0014495)
NichoV   
2009-12-14 15:43   
I have found that the string constants URL_REQUEST_GRANTED and URL_REQUEST_DENIED does not exist in the current OpenSim implementation.

http://wiki.secondlife.com/wiki/URL_REQUEST_GRANTED [^]

is a link that shows that they are indeed constants, even though they map to a string with the exact wording:
string URL_REQUEST_GRANTED = "URL_REQUEST_GRANTED";

So while it is true that it can be rectified with quotes around the constant, perhaps the constants should be added as well.
(0014535)
Fly-Man-   
2009-12-18 05:46   
At this moment, it works like mentioned in my post so i don't see any objections on keeping this one open
(0015394)
melanie   
2010-05-02 17:39   
af0ffb2