Difference between revisions of "LlSetContentType"

From Second Life Wiki
Jump to navigation Jump to search
(I think this function is intended for attachments, hence the owner restriction.)
m (filling in values)
Line 19: Line 19:
! Content-Type
! Content-Type
{{!}}- <!-- to correct these, change the ihex value to the base 10 integer value of the constant and remove "|hex=0x?" and delete this comment-->
{{!}}- <!-- to correct these, change the ihex value to the base 10 integer value of the constant and remove "|hex=0x?" and delete this comment-->
{{!}} {{LSL Const|CONTENT_TYPE_TEXT|integer|ihex=unknown value|hex=0x?|c=text/plain}}
{{!}} {{LSL Const|CONTENT_TYPE_TEXT|integer|ihex=unknown value|hex=0x0|c=text/plain}}
{{!}} {{#var:value}}
{{!}} {{#var:value}}
{{!}} {{#var:comment}}
{{!}} {{#var:comment}}
{{!}}-
{{!}}-
{{!}} {{LSL Const|CONTENT_TYPE_HTML|integer|ihex=unknown value|hex=0x?|c=text/html}}
{{!}} {{LSL Const|CONTENT_TYPE_HTML|integer|ihex=unknown value|hex=0x1|c=text/html}}
{{!}} {{#var:value}}
{{!}} {{#var:value}}
{{!}} {{#var:comment}}
{{!}} {{#var:comment}}

Revision as of 08:32, 22 August 2011

KBcaution.png Important: This feature is currently only available on the RC Magnum server channel.
Emblem-important-red.png Pre-release Documentation Warning!

This function is not available yet. This documentation was written prior to its final release so it may not match the final implementation.

Summary

Function: llSetContentType( key request_id, integer content_type );

Set the "Wikipedia logo"Internet media type of an LSL HTTP server response.[1]

• key request_id a valid http_request() key
• integer content_type Media type to use with any following llHTTPResponse(request_id, ...)

content_type Content-Type
CONTENT_TYPE_TEXT 0x0 text/plain
CONTENT_TYPE_HTML 0x1 text/html

Caveats

  • This setting will be ignored if..
    1. the web browser is not the Second Life client
    2. the user (logged into the SL client viewing the page) is not the owner of the object. What about group owned objects?
All Issues ~ Search JIRA for related Bugs

Examples

See Also

Events

•  http_request

Functions

•  llHTTPResponse

Articles

•  LSL HTTP server

Deep Notes

History

  • Scheduled for RC Magnum channel, week of August 3, 2011.
Search JIRA for related Issues

Footnotes

  1. ^ This function sets the "Content-Type" header in any subsequent llHTTPResponse responses.

Signature

function void llSetContentType( key request_id, integer content_type );

Comments

The client and owner limitations are most likely to remove the possibility of running a website from a prim.