Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005836opensim[REGION] Script Functionspublic2012-01-01 20:222012-01-01 21:53
Reportersendapatch 
Assigned ToBlueWall 
PrioritylowSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Versionmaster (dev code) 
Target VersionFixed in Versionmaster (dev code) 
Summary0005836: [PATCH] Non-successful response to an llHTTPRequest uses status description as body rather than HTTP body
DescriptionWhen you request something with llHTTPRequest that returns a non-successful response code, OpenSimulator returns the status description in the body parameter to http_response. Linden Lab's implementation returns the HTTP body, rather than the status description.
Steps To Reproduce1. Run an HTTP server on port 1234 (and make sure it's accessible by the simulator) which serves a 500 response code with the status description "status" and the body "body".
2. Create an object with the this script in it (obviously replacing <code>yourip</code> with the IP address running the HTTP server, as accessible by the simulator) (also, it seems like Mantis is adding a caret in the middle of the list literal; remove that):
default {
    state_entry() {
        llHTTPRequest("http://yourip:1234/", [^] [], "");
    }
    http_response(key id, integer status, list metadata, string body) {
        llSay(0, body);
    }
}

3. Observe that in OpenSimulator, it says "status", whereas in Linden Lab's simulator implementation, it says "body".
TagsNo tags attached.
Git Revision or version number56dbcae402000e199e556827944dfdd1bb3a64be
Run ModeStandalone (1 Region) , Standalone (Multiple Regions) , Grid (1 Region per Sim) , Grid (Multiple Regions per Sim)
Physics EngineBasicPhysics, PhysicsOfSimplicity, ODE, BulletX, PhysX, Other
EnvironmentUnknown, Mono / Linux32, Mono / Linux64, Mono / Windows, Mono / OSX, .NET / Windows32, .NET / Windows64
Mono Version2.10
Viewer
Attached Filespatch file icon fix-error-responses.patch [^] (1,971 bytes) 2012-01-01 20:22 [Show Content]
? file icon error-server.py [^] (1,102 bytes) 2012-01-01 20:23

- Relationships

-  Notes
(0020605)
sendapatch (reporter)
2012-01-01 20:24

I've attached a simple HTTP server written in Python that serves such a response as described in the steps to reproduce.
(0020606)
BlueWall (administrator)
2012-01-01 20:48

Thanks for the patch! Applied r87374274b9a5.
(0020607)
sendapatch (reporter)
2012-01-01 21:53

Thank you!

- Issue History
Date Modified Username Field Change
2012-01-01 20:22 sendapatch New Issue
2012-01-01 20:22 sendapatch File Added: fix-error-responses.patch
2012-01-01 20:23 sendapatch Status new => patch included
2012-01-01 20:23 sendapatch File Added: error-server.py
2012-01-01 20:24 sendapatch Note Added: 0020605
2012-01-01 20:26 sendapatch Steps to Reproduce Updated View Revisions
2012-01-01 20:48 BlueWall Mono Version None => 2.10
2012-01-01 20:48 BlueWall Note Added: 0020606
2012-01-01 20:48 BlueWall Status patch included => resolved
2012-01-01 20:48 BlueWall Resolution open => fixed
2012-01-01 20:48 BlueWall Assigned To => BlueWall
2012-01-01 21:53 sendapatch Note Added: 0020607
2012-01-01 21:53 sendapatch Status resolved => closed
2012-01-01 21:53 sendapatch Fixed in Version => master (dev code)


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker