HTTP_MIMETYPE seems not to be what it should be.
tracked
Journey Bunny
I'm trying to send an API post to the pastebin endpoint. When I send via LSL and use a proper MIMETYPE, I get an HTTP Error 415, Response: Unsupported or unknown Content-Type
When I send with no MIMETYPE and instead send with HTTP_CUSTOM_HEADER, I get this debug window error: "HTTP_CUSTOM_HEADER value is an invalid header".
I presume that this second problem is due to the caveat "Note that certain headers, such as the default headers, are blocked for security reasons."
The content type I wish to use is application/x-www-form-urlencoded
When I send a request to pasetbin using that content type outside of LSL (Python), everything works great. From SL, no good.
Edit: Moving an important detail from the hidden details field up here, too:
As a side-note, another bug!!! The wiki (https://wiki.secondlife.com/wiki/LlHTTPRequest) says that one accept parameter we can use is "text/plain;charset=utf-8"
Using that string yields an error also!
Log In
Maestro Linden
tracked
Maestro Linden
Hi Journey Bunny thanks for the report. I did some testing of my own on other test sites, which echo all the headers sent by the clients in the body. It does seem that HTTP_MIMETYPE is failing to affect the request, even when using LSL-legal options such as "text/html" or "application/x-www-form-urlencoded". I used Second Life Server 2025-07-25.16512260888 for testing. For example,
llHTTPRequest("https://httpbin.org/headers", [ HTTP_MIMETYPE, "application/x-www-form-urlencoded"], "");
yields this response:
{
"headers": {
"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-Charset": "utf-8;q=1.0, *;q=0.5",
"Accept-Encoding": "deflate, gzip",
"Cache-Control": "no-cache, max-age=0",
"Host": "httpbin.org",
"Pragma": "no-cache",
"User-Agent": "Second-Life-LSL/2025-07-31.16657051566 (https://secondlife.com)",
"X-Amzn-Trace-Id": "Root=1-689a41e2-756dd00e04a1a8cb791f41f5",
"X-Secondlife-Local-Position": "(210.767365, 105.626633, 1999.031982)",
"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": "6bb08c1f-3742-d1eb-d03a-538bcf9cff59",
"X-Secondlife-Object-Name": "llHttpRequest Test",
"X-Secondlife-Owner-Key": "e1a51880-d7b5-4c00-800d-91664f5b84c0",
"X-Secondlife-Owner-Name": "Maestro Linden",
"X-Secondlife-Region": "By Design (261376, 246784)",
"X-Secondlife-Shard": "Production"
}
By contrast, calling ``
curl -H "Mime-Type: application/x-www-form-urlencoded" http://httpbin.org/headers
`` from my local machine works as expected. I also see a HTTP_MIMETYPE option failure when doing a POST request, like so:
llHTTPRequest("https://echo.free.beeceptor.com", [ HTTP_METHOD, "POST", HTTP_MIMETYPE, "application/x-www-form-urlencoded"], "");
Peter Stindberg is correct that there are some other issues with Pastebin access with LSL, but it's a legitimate bug that HTTP_MIMETYPE is seemingly ignored.
Peter Stindberg
Pastebin does not work. I tried for years and couldn't get it to work. Then I had a lengthy discussion with Monty about it a while back on the forums. Pastebin expects an empty http-access header, and http-out always puts something in. There is a feature request for empty header somewhere, and I think it has the whole convo in it.
Edit: Found it!
and