Difference between revisions of "LlGetHTTPHeader"

From Second Life Wiki
Jump to navigation Jump to search
(Add header info to Spec - format needs work)
m
Line 1: Line 1:
{{LSL_Function
{{LSL_Function
|func_id=349|func_sleep=0.0|func_energy=10.0
|func_id=349|func_sleep=0.0|func_energy=10.0|mode
|func=llGetHTTPHeader|return_type=string
|func=llGetHTTPHeader|return_type=string
|p1_type=key|p1_name=request_id|p1_desc=A valid HTTP request key.
|p1_type=key|p1_name=request_id|p1_desc=A valid HTTP request key.
Line 26: Line 26:
|examples=
|examples=
|helpers
|helpers
|mode=preview
|also_functions=
|also_functions=
{{LSL DefineRow||[[llGetFreeURLs]]}}
{{LSL DefineRow||[[llGetFreeURLs]]}}

Revision as of 08:24, 13 July 2009

Summary

Function: string llGetHTTPHeader( key request_id, string header );
0.0 Forced Delay
10.0 Energy

Returns a string that is the value for header for request_id.

• key request_id A valid HTTP request key.
• string header Header value name.

Specification

Supported Headers
  • "x-script-url": The base url, as originally recieved from llRequestPublicURL
  • "x-path-info": Any trailing path information from the requested url
  • "x-query-string": Any query arguments, the text past a ? in the url
  • "x-remote-ip": IP address of the host that made the request
  • "user-agent": The user-agent header as reported by the requester

Caveats

  • LSL is not a CGI environment
    • "Content-Type" is an example of a normal header name, in a CGI environment the name would be "HTTP_CONTENT_TYPE".
  • This header information is valid for 30 seconds, or until llHTTPResponse() is called.

Examples

See Also

Events

•  http_request

Functions

•  llGetFreeURLs
•  llRequestURL
•  llRequestSecureURL
•  llReleaseURL
•  llHTTPResponse

Articles

•  LSL http server
•  "Wikipedia logo"Wikipedia:List of HTTP headers

Deep Notes

History

Signature

function string llGetHTTPHeader( key request_id, string header );