Any workarounds for the character limit in llHTTPRequest custom headers?

Innula Zenovka

Nasty Brit
VVO Supporter 🍦🎈👾❤
Joined
Sep 20, 2018
Messages
20,558
SLU Posts
18459
Problem: I'm trying to communicate from inside SL with a third-party service. To do this, first I need to submit my credentials to the external server, using llHTTPRequest, which responds by sending me a token, which I need to include in the headers of subsequent llHTTPRequests to get the service to do anything for me.

I can submit my credentials and receive the token without any difficulty, but the token is 696 characters long and, in the words of the wiki "Up to 8 custom headers may be configured per request, and each header's combined name+value length must be no greater than 253 characters."

Is there any workaround for this?
 

Soen Eber

Vatican mole
VVO Supporter 🍦🎈👾❤
Joined
Sep 20, 2018
Messages
3,188
If you were running a server (either on your PC or on a host) you could write a service to interface between the website you are authenticating to and a web page you create separately to make the data available to LSL.

LSL <---> custom web page <--> custom service <--> autheticating website

the custom service would need to be written in PHP or JavaScript or something similar, and be robust enough to send information back & forth between your custom web page and the authenticating website. You could then use LSL to request data from the authenticating website and screen scrape data from the server back to Second Life. Perhaps the website you're accessing already has tools or reports you can use or a 3rd party app/open source project, that would be my first attempt. If you roll your own service you may also need to get permission, and monitor closely for any bandwidth or service charges or caps that might apply during testing and actual use. A carele$$ly written $ervice might .. go all wrong ($ because post-Brexit I don't know what the Tories are moving to ... wool and linen?

Auth and refresh tokens cap at 1024 characters each, and that's something a toy language (LSL) can't really handle (but I'm willing to be proven wrong).

Could you be more specific?
 
Last edited:
  • 1Thanks
Reactions: Innula Zenovka

Soen Eber

Vatican mole
VVO Supporter 🍦🎈👾❤
Joined
Sep 20, 2018
Messages
3,188
Ah ... could someone who is more knowledgeable either rip my response into tiny little pieces and say 'THIS IS WHAT YOU REALLY NEED TO DO" or click Agree so I know I'm on the right track for replying to Innula? I know what I suggested would work, but it's a lot of ... hassle ... and there might be an easier method. Like, could she pack the response over time or discover a service she could interact with to send the authentication or there's an Open Source LSL library or ... ?

Innula: there's a bit of a cap on how often you can use HTTP via LSL, what are your capacity requirements?
 

Innula Zenovka

Nasty Brit
VVO Supporter 🍦🎈👾❤
Joined
Sep 20, 2018
Messages
20,558
SLU Posts
18459
Ah ... could someone who is more knowledgeable either rip my response into tiny little pieces and say 'THIS IS WHAT YOU REALLY NEED TO DO" or click Agree so I know I'm on the right track for replying to Innula? I know what I suggested would work, but it's a lot of ... hassle ... and there might be an easier method. Like, could she pack the response over time or discover a service she could interact with to send the authentication or there's an Open Source LSL library or ... ?

Innula: there's a bit of a cap on how often you can use HTTP via LSL, what are your capacity requirements?
The throttle won't be an issue (25 requests in 20 seconds for each object, and 1000 in 20 seconds for each owner). Discussions are going on with the third-party service to see if there's anything they can do (and your suggestion of a proxy is one of the ideas under consideration).
 
  • 1Thanks
Reactions: Soen Eber

Noodles

☑️
Joined
Sep 20, 2018
Messages
3,825
Location
Illinois
SL Rez
2006
Joined SLU
04-28-2010
SLU Posts
6947
I keep wanting to ask if you can break the header up and omit parts, but then remeber you mentioned its one huge key, so I am just going to "suggest" it anyway so maybe I will stop thinking of it as a solution.