Bavid Dailey Posted January 27 Share Posted January 27 I have a script that collects data from a HUD it dispenses and which allows people to vote on questions. THis all works and now I want to display the aggregated results in real time as they change. Not many ways to do this well in LSL, so I decided to write a small webserver to deliver a page with the results. According to the LSL Wiki, on the LSL HTTP server page Quote This is the counterpart to llHTTPRequest. While llHTTPRequest enables LSL scripts to request data from HTTP-accessible sources, HTTP-in enables outside sources to request data from LSL scripts in Second Life. The key difference is that llHTTPRequest exchanges data when the script in SL wants; HTTP-in allows outside sources to determine when they need to communicate with LSL scripts in SL. Prior to HTTP-in, similar functionality could be achieved by polling with llHTTPRequest, llEmail and XML-RPC. All three are cumbersome and the latter two have serious scalability bottlenecks. It is important to note that LSL HTTP servers cannot use llSetContentType with CONTENT_TYPE_HTML for an llHTTPResponse except in very limited circumstances. See Other Limitations for details. This section forms the Incoming HTTP pipeline. The page goes on to refer to examples and discuss obvious applications, one example being what I am trying to do. Yet it appears to be impossible to deliver a simple HTML page in response to a request. As far as I can see, that ability has been deliberately crippled - as the content_type cannot be set to CONTENT_TYPE_HTML. I talked to one perosn who claims to have bypassed the restriction, but couldm't remember how they did it. I'm baffled, can any body help? Link to comment Share on other sites More sharing options...
Wulfie Reanimator Posted January 27 Share Posted January 27 (edited) You can use CONTENT_TYPE_XHTML to respond with HTML. You have to also include the following, if I recall: <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'> <html xmlns='http://www.w3.org/1999/xhtml'> <body> ... </body> </html> Your HTML elements can also include style tags. Edited January 27 by Wulfie Reanimator 1 Link to comment Share on other sites More sharing options...
Bavid Dailey Posted January 28 Author Share Posted January 28 Oh thankyou Wulfie. Itt was the html xmlns='http://www.w3.org/1999/xhtml' that i was missing. Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now