MasterPoppyさん、はじめまして(ωV_vω)ペコ
アカーシャさんから色々と聞いています^^
あたしも色々と試してうまく行っていないので気になってたところですが、テストのLSLをSLとJOG(Sandbox3)でテストして、HTTPヘッダー見てみました。
ちなみにSLですと、UserAgentをビューワのものにすれば、普通のブラウザからもアクセスできることは確認済みです。
<テストしたLSL>
string url;
key uid;
string web = "<!DOCTYPE html><html lang=\"ja\"><head><title>あほなテスト</title></head><body><div class=\"fixie\" style=\"width:500px;margin:5px auto 5px auto;padding:10px;background-color:#dddddd;border-radius:15px;border:1px solid #333333;\"><h1>タイトルらしい</h1><p>本文らしい</p><button onclick=\"alert('あほです')\">押してね</button></div><script type=\"text/javascript\" src=\"https://raw.github.com/ryhan/fixie/master/fixie_min.js\"></script></body></html>";
default
{
state_entry()
{
uid = llRequestURL();
}
touch_start(integer total_number)
{
llSay(0, url);
}
changed(integer change)
{
if(change & CHANGED_REGION_START)
{
uid = llRequestURL();
}
}
http_request(key request_id, string method, string body)
{
llOwnerSay(llGetHTTPHeader(request_id, "x-script-url"));
llOwnerSay(llGetHTTPHeader(request_id, "x-path-info"));
llOwnerSay(llGetHTTPHeader(request_id, "x-query-string"));
llOwnerSay(llGetHTTPHeader(request_id, "x-remote-ip"));
llOwnerSay(llGetHTTPHeader(request_id, "user-agent"));
if(request_id == uid)
{
if(method == URL_REQUEST_GRANTED)
{
url = body;
llOwnerSay("url= " + url);
}
else if(method == URL_REQUEST_DENIED)
{
llSay(0, "エラーのため、使用できません。");
}
}
else
{
llSetContentType(request_id, CONTENT_TYPE_HTML);
//OpenSimの場合は、osSetContentType(request_id, "text/html");に置き換える。
llHTTPResponse(request_id, 200, web);
}
}
}
<Second Lifeの場合(一部プライバシーに関わる部分は伏せ字にしています)>
9741: URL_REQUEST
http://sim10468.agni.lindenlab.com:12046/cap/5838a62e-f832-e771-ae74-4444557f53a2
Start Time: 2016-10-25 00:46:52.992
t=19593 [st= 0] +REQUEST_ALIVE [dt=454]
t=19594 [st= 1] DELEGATE_INFO [dt=0]
--> delegate_info = "NavigationResourceThrottle"
t=19594 [st= 1] URL_REQUEST_DELEGATE [dt=0]
t=19594 [st= 1] URL_REQUEST_START_JOB [dt=0]
--> load_flags = 37121 (MAIN_FRAME | MAYBE_USER_GESTURE | VALIDATE_CACHE | VERIFY_EV_CERT)
--> method = "GET"
--> priority = "HIGHEST"
--> url = "http://sim10468.agni.lindenlab.com:12046/cap/5838a62e-f832-e771-ae74-4444557f53a2"
t=19594 [st= 1] +URL_REQUEST_START_JOB [dt=447]
--> load_flags = 37121 (MAIN_FRAME | MAYBE_USER_GESTURE | VALIDATE_CACHE | VERIFY_EV_CERT)
--> method = "GET"
--> priority = "HIGHEST"
--> url = "http://sim10468.agni.lindenlab.com:12046/cap/5838a62e-f832-e771-ae74-4444557f53a2"
t=19597 [st= 4] +URL_REQUEST_DELEGATE [dt=4]
t=19597 [st= 4] DELEGATE_INFO [dt=4]
--> delegate_info = "拡張機能 User-Agent Switcher for Chrome"
t=19601 [st= 8] CHROME_EXTENSION_MODIFIED_HEADERS
--> deleted_headers = []
--> extension_id = "djflhoibgkdhkhhcedjiklpkjnoahfmg"
--> modified_headers = ["User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) (SecondLife/4.7.9.50527 (Firestorm-Release; firestorm skin)) Chrome/47.0.2526.80 Safari/537.36"]
t=19601 [st= 8] -URL_REQUEST_DELEGATE
t=19602 [st= 9] HTTP_CACHE_GET_BACKEND [dt=0]
t=19602 [st= 9] HTTP_CACHE_OPEN_ENTRY [dt=0]
t=19602 [st= 9] HTTP_CACHE_ADD_TO_ENTRY [dt=0]
t=19602 [st= 9] HTTP_CACHE_READ_INFO [dt=0]
t=19602 [st= 9] URL_REQUEST_DELEGATE [dt=0]
t=19602 [st= 9] +HTTP_STREAM_REQUEST [dt=259]
t=19602 [st= 9] HTTP_STREAM_REQUEST_STARTED_JOB
--> source_dependency = 9744 (HTTP_STREAM_JOB)
t=19861 [st=268] HTTP_STREAM_REQUEST_BOUND_TO_JOB
--> source_dependency = 9744 (HTTP_STREAM_JOB)
t=19861 [st=268] -HTTP_STREAM_REQUEST
t=19861 [st=268] +HTTP_TRANSACTION_SEND_REQUEST [dt=1]
t=19861 [st=268] HTTP_TRANSACTION_SEND_REQUEST_HEADERS
--> GET /cap/5838a62e-f832-e771-ae74-4444557f53a2 HTTP/1.1
Host: sim10468.agni.lindenlab.com:12046
Connection: keep-alive
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) (SecondLife/4.7.9.50527 (Firestorm-Release; firestorm skin)) Chrome/47.0.2526.80 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
DNT: 1
Accept-Encoding: gzip, deflate, sdch
Accept-Language: ja,en-US;q=0.8,en;q=0.6
t=19862 [st=269] -HTTP_TRANSACTION_SEND_REQUEST
t=19862 [st=269] +HTTP_TRANSACTION_READ_HEADERS [dt=178]
t=19862 [st=269] HTTP_STREAM_PARSER_READ_HEADERS [dt=178]
t=20040 [st=447] HTTP_TRANSACTION_READ_RESPONSE_HEADERS
--> HTTP/1.1 200 OK
Date: Mon, 24 Oct 2016 15:46:56 GMT
Server: Second Life LSL/Second Life Server 16.10.07.320397 (http://secondlife.com)
Content-Length: 464
Cache-Control: no-cache, max-age=0
Content-Type: text/html; charset=utf-8
Pragma: no-cache
X-SecondLife-Local-Position: (xxx.xxxxxx, yyy.yyyyyy, zzzz.zzzzzz)
X-SecondLife-Local-Rotation: (0.000000, 0.000000, 0.000000, 1.000000)
X-SecondLife-Local-Velocity: (0.000000, 0.000000, 0.000000)
X-SecondLife-Object-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
X-SecondLife-Object-Name: Object
X-SecondLife-Owner-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
X-SecondLife-Owner-Name: Exwood Porta
X-SecondLife-Region: xxxxxx (xxxxxx, xxxxxx)
X-SecondLife-Shard: Production
Connection: close
t=20040 [st=447] -HTTP_TRANSACTION_READ_HEADERS
t=20040 [st=447] HTTP_CACHE_WRITE_INFO [dt=0]
t=20040 [st=447] HTTP_CACHE_WRITE_DATA [dt=0]
t=20040 [st=447] HTTP_CACHE_WRITE_INFO [dt=0]
t=20040 [st=447] URL_REQUEST_DELEGATE [dt=1]
t=20041 [st=448] -URL_REQUEST_START_JOB
t=20041 [st=448] +URL_REQUEST_DELEGATE [dt=0]
t=20041 [st=448] DELEGATE_INFO [dt=0]
--> delegate_info = "NavigationResourceThrottle"
t=20041 [st=448] -URL_REQUEST_DELEGATE
t=20041 [st=448] HTTP_TRANSACTION_READ_BODY [dt=0]
t=20041 [st=448] HTTP_CACHE_WRITE_DATA [dt=1]
t=20042 [st=449] URL_REQUEST_JOB_BYTES_READ
--> byte_count = 464
t=20043 [st=450] HTTP_TRANSACTION_READ_BODY [dt=1]
t=20044 [st=451] HTTP_CACHE_WRITE_DATA [dt=0]
t=20047 [st=454] -REQUEST_ALIVE
<JOGの場合>
9849: URL_REQUEST
http://andromeda03.jogrid.net:9000/lslhttp/c6081f5f-b33a-45d3-a38e-12a5c05a258e/
Start Time: 2016-10-25 00:53:48.474
t=6442 [st= 0] +REQUEST_ALIVE [dt=370]
t=6442 [st= 0] DELEGATE_INFO [dt=1]
--> delegate_info = "NavigationResourceThrottle"
t=6443 [st= 1] URL_REQUEST_DELEGATE [dt=0]
t=6443 [st= 1] URL_REQUEST_START_JOB [dt=0]
--> load_flags = 37121 (MAIN_FRAME | MAYBE_USER_GESTURE | VALIDATE_CACHE | VERIFY_EV_CERT)
--> method = "GET"
--> priority = "HIGHEST"
--> url = "http://andromeda03.jogrid.net:9000/lslhttp/c6081f5f-b33a-45d3-a38e-12a5c05a258e/"
t=6443 [st= 1] +URL_REQUEST_START_JOB [dt=86]
--> load_flags = 37121 (MAIN_FRAME | MAYBE_USER_GESTURE | VALIDATE_CACHE | VERIFY_EV_CERT)
--> method = "GET"
--> priority = "HIGHEST"
--> url = "http://andromeda03.jogrid.net:9000/lslhttp/c6081f5f-b33a-45d3-a38e-12a5c05a258e/"
t=6443 [st= 1] +URL_REQUEST_DELEGATE [dt=5]
t=6444 [st= 2] DELEGATE_INFO [dt=4]
--> delegate_info = "拡張機能 User-Agent Switcher for Chrome"
t=6448 [st= 6] CHROME_EXTENSION_MODIFIED_HEADERS
--> deleted_headers = []
--> extension_id = "djflhoibgkdhkhhcedjiklpkjnoahfmg"
--> modified_headers = ["User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) (SecondLife/4.7.9.50527 (Firestorm-Release; firestorm skin)) Chrome/47.0.2526.80 Safari/537.36"]
t=6448 [st= 6] -URL_REQUEST_DELEGATE
t=6448 [st= 6] HTTP_CACHE_GET_BACKEND [dt=0]
t=6448 [st= 6] HTTP_CACHE_OPEN_ENTRY [dt=0]
t=6448 [st= 6] HTTP_CACHE_ADD_TO_ENTRY [dt=0]
t=6448 [st= 6] HTTP_CACHE_READ_INFO [dt=1]
t=6449 [st= 7] URL_REQUEST_DELEGATE [dt=0]
t=6449 [st= 7] +HTTP_STREAM_REQUEST [dt=0]
t=6449 [st= 7] HTTP_STREAM_REQUEST_STARTED_JOB
--> source_dependency = 9852 (HTTP_STREAM_JOB)
t=6449 [st= 7] HTTP_STREAM_REQUEST_BOUND_TO_JOB
--> source_dependency = 9852 (HTTP_STREAM_JOB)
t=6449 [st= 7] -HTTP_STREAM_REQUEST
t=6449 [st= 7] +HTTP_TRANSACTION_SEND_REQUEST [dt=0]
t=6449 [st= 7] HTTP_TRANSACTION_SEND_REQUEST_HEADERS
--> GET /lslhttp/c6081f5f-b33a-45d3-a38e-12a5c05a258e/ HTTP/1.1
Host: andromeda03.jogrid.net:9000
Connection: keep-alive
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) (SecondLife/4.7.9.50527 (Firestorm-Release; firestorm skin)) Chrome/47.0.2526.80 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
DNT: 1
Accept-Encoding: gzip, deflate, sdch
Accept-Language: ja,en-US;q=0.8,en;q=0.6
t=6449 [st= 7] -HTTP_TRANSACTION_SEND_REQUEST
t=6449 [st= 7] +HTTP_TRANSACTION_READ_HEADERS [dt=79]
t=6449 [st= 7] HTTP_STREAM_PARSER_READ_HEADERS [dt=79]
t=6528 [st= 86] HTTP_TRANSACTION_READ_RESPONSE_HEADERS
--> HTTP/1.1 200 OK
Content-Type: text/plain
Date: Tue, 25 Oct 2016 00:53:51 GMT
Content-Length: 464
Server: Tiny WebServer
Connection: close
t=6528 [st= 86] -HTTP_TRANSACTION_READ_HEADERS
t=6528 [st= 86] HTTP_CACHE_WRITE_INFO [dt=0]
t=6528 [st= 86] HTTP_CACHE_WRITE_DATA [dt=1]
t=6529 [st= 87] HTTP_CACHE_WRITE_INFO [dt=0]
t=6529 [st= 87] URL_REQUEST_DELEGATE [dt=0]
t=6529 [st= 87] -URL_REQUEST_START_JOB
t=6529 [st= 87] +URL_REQUEST_DELEGATE [dt=2]
t=6530 [st= 88] DELEGATE_INFO [dt=1]
--> delegate_info = "NavigationResourceThrottle"
t=6531 [st= 89] -URL_REQUEST_DELEGATE
t=6531 [st= 89] HTTP_TRANSACTION_READ_BODY [dt=278]
t=6809 [st=367] HTTP_CACHE_WRITE_DATA [dt=0]
t=6809 [st=367] URL_REQUEST_JOB_BYTES_READ
--> byte_count = 464
t=6810 [st=368] HTTP_TRANSACTION_READ_BODY [dt=0]
t=6810 [st=368] HTTP_CACHE_WRITE_DATA [dt=0]
t=6812 [st=370] -REQUEST_ALIVE
SLだと、LSLから外部のサーバーにアクセスした場合にヘッダに付加情報( X-SecondLife-Owner-Key等)を乗せてくるので、多分内部からプリムのサーバーにアクセスした場合にも同様に付加情報を流してるんじゃないかと推測されます。見たところOpenSimの場合にはそれが見当たりませんね。