[sldev] Web Textures and error responses: pass error handling into http_response
SignpostMarv Martin
me at signpostmarv.name
Tue Apr 7 12:27:20 PDT 2009
Problem: JPEG requested, server refuses or fouls up request. What gets
displayed ?
Potential solution:
Use an LSL function to request an asset UUID for a given URL.
* key llRequestWebTexture(string url);
* request headers similar to those sent with llHTTPRequest() would be
sent (thus allowing servers to allow/deny based on the Requesting
Resident, region of origin etc.)
If the fetch gets a 200, the texture can immediately be used with
llSetTexture() etc.
Any other code then fires off http_response(), where the request_id
parameter matches the one returned by llRequestWebTexture().
This would then allow scripts to make intelligent responses based on
standard HTTP response codes (401, 402, 403)
http://en.wikipedia.org/wiki/List_of_HTTP_status_codes#4xx_Client_Error
Retaining the ability for the viewer to disable 3rd-party web textures
would then be switched to not obeying 301/302 redirects.
Caveats:
1) Would require HTTP asset server & viewer to support 301/302 redirects
2) Would likely force LL to impose file size restrictions (no
multi-megabyte poorly compressed PNG/MNG/aPNG)
~ Marv.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3244 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.secondlife.com/pipermail/sldev/attachments/20090407/4decc0cb/attachment.bin
More information about the SLDev
mailing list