Template:LSL Constants/HTTP Headers: Difference between revisions

From Second Life Wiki
Jump to navigation Jump to search
Nelson Jenkins (talk | contribs)
m Added warning about HTTP header field name case-insensitivity
Nelson Jenkins (talk | contribs)
m fix formatting
 
Line 91: Line 91:
{{!}}-  
{{!}}-  
{{!}}- class="sortbottom"  
{{!}}- class="sortbottom"  
{{!}} colspan="3" {{!}} <sup>
{{!}} colspan="3" {{!}}  
{{KBtip|Certain server environments (CGI) place headers into variables by capitalizing the entire name, replacing dashes with underscores, and prefixing the name with "HTTP_", e.g. "{{#if:{{{lower-case|}}}|x-secondlife-object-name|X-SecondLife-Object-Name}}" becomes "HTTP_X_SECONDLIFE_OBJECT_NAME". This depends solely on the HTTP server used to process the request and cannot be controlled via LSL.}}
{{KBtip|Certain server environments (CGI) place headers into variables by capitalizing the entire name, replacing dashes with underscores, and prefixing the name with "HTTP_", e.g. "{{#if:{{{lower-case|}}}|x-secondlife-object-name|X-SecondLife-Object-Name}}" becomes "HTTP_X_SECONDLIFE_OBJECT_NAME". This depends solely on the HTTP server used to process the request and cannot be controlled via LSL.}}
{{KBwarning|width=75%|[https://datatracker.ietf.org/doc/html/rfc2616#section-4.2 RFC 2616 § 4.2] defines HTTP header field names as case-insensitive. The capitalization of header field names shown above is not guaranteed; for example, "X-SecondLife-Object-Name" may be received as "X-Secondlife-Object-Name". See {{JIRA|BUG-5094}} for an instance of ISPs recapitalizing headers. This behavior was also observed when testing in 2026.}}
{{KBwarning|width=75%|[https://datatracker.ietf.org/doc/html/rfc2616#section-4.2 RFC 2616 § 4.2] defines HTTP header field names as case-insensitive. The capitalization of header field names shown above is not guaranteed; for example, "X-SecondLife-Object-Name" may be received as "X-Secondlife-Object-Name". See {{JIRA|BUG-5094}} for an instance of ISPs recapitalizing headers. This behavior was also observed when testing in 2026.}}
</sup>
 
{{!}} style="display:none;" {{!}}
{{!}} style="display:none;" {{!}}
{{!}} style="display:none;" {{!}}
{{!}} style="display:none;" {{!}}
{{!}}}
{{!}}}

Latest revision as of 15:06, 4 May 2026

Headers sent by the simulator in the course of calling llHTTPRequest.
Header Description Example data
Connection Connection options close
Cache-Control Maximum response age accepted. max-age=259200
X-Forwarded-For Used to show the IP address connected to through proxies. 127.0.0.1
Via Shows the recipients and protocols used between the User Agent and the server. 1.1 sim10115.agni.lindenlab.com:3128 (squid/2.7.STABLE9)
Content-Length The size of the entity-body, in decimal number of octets. 17
Pragma The message should be forwarded to the server, even if it has a cached version of the data. no-cache
X-SecondLife-Shard The environment the object is in. "Production" is the main grid and "Testing" is the preview grid Production
X-SecondLife-Region The name of the region the object is in, along with the global coordinates of the region's south-west corner Jin Ho (264448, 233984)
X-SecondLife-Owner-Name Legacy name of the owner of the object Zeb Wyler
X-SecondLife-Owner-Key UUID of the owner of the object 01234567-89ab-cdef-0123-456789abcdef
X-SecondLife-Object-Name The name of the object containing the script Object
X-SecondLife-Object-Key The key of the object containing the script 01234567-89ab-cdef-0123-456789abcdef
X-SecondLife-Local-Velocity The velocity of the object 0.000000, 0.000000, 0.000000
X-SecondLife-Local-Rotation The rotation of the object containing the script 0.000000, 0.000000, 0.000000, 1.000000
X-SecondLife-Local-Position The position of the object within the region (173.009827, 75.551231, 60.950001)
User-Agent The user-agent header sent by LSL Scripts. Contains Server version. Second Life LSL/16.05.24.315768 (http://secondlife.com)
Content-Type The media type of the entity body. text/plain; charset=utf-8
Accept-Charset Acceptable character sets from the server. Q being the quality expected when sending the different character sets. utf-8;q=1.0, *;q=0.5
Accept Media types the server will accept. text/*, application/xhtml+xml, application/atom+xml, application/json, application/xml, application/llsd+xml, application/x-javascript, application/javascript, application/x-www-form-urlencoded, application/rss+xml
Accept-Encoding Acceptable content encodings for the server. deflate, gzip
Host The internet host being requested. secondlife.com
Tip: Certain server environments (CGI) place headers into variables by capitalizing the entire name, replacing dashes with underscores, and prefixing the name with "HTTP_", e.g. "X-SecondLife-Object-Name" becomes "HTTP_X_SECONDLIFE_OBJECT_NAME". This depends solely on the HTTP server used to process the request and cannot be controlled via LSL.
⚠️ Warning: RFC 2616 § 4.2 defines HTTP header field names as case-insensitive. The capitalization of header field names shown above is not guaranteed; for example, "X-SecondLife-Object-Name" may be received as "X-Secondlife-Object-Name". See BUG-5094 for an instance of ISPs recapitalizing headers. This behavior was also observed when testing in 2026.