Jump to content
Sign in to follow this  
animats

LSL HTTP requests don't redirect automatically

Recommended Posts

I have a script that makes HTTP requests to a server of mine. My demo and review bikes log region crossings. This has been working for over a year, but recently started failing. It makes them as HTTP requests, but the site now redirects them to the HTTPS port with a 301 Moved Permanently status. This is because Dreamhost made everything go through HTTPS, and is now redirecting all HTTP requests to the corresponding HTTPS URL.

So, my scripts print the error:

 Smooth Rider - V2.6.3 (DEMO): Logging request to http://███████████████████████████████████ failed. Status 301

The LSL HTTP interface doesn't automatically redirect in that situation. Most HTTP libraries handle this automatically, but LSL's does not.

So, if you're still using HTTP, not HTTPS, from LSL, you need to prepare for any "upgrades" from your hosting service.

Share this post


Link to post
Share on other sites

Be sure that you are not trying to follow an excessively long chain of redirects.  LSL HTTP does automatically follow redirects, but the number of redirections is limited.

 

  • Thanks 2

Share this post


Link to post
Share on other sites
On 11/17/2019 at 3:00 PM, animats said:

The LSL HTTP interface doesn't automatically redirect in that situation. Most HTTP libraries handle this automatically, but LSL's does not.

LSL does do automatic redirection for GET (and HEAD) requests, but not for other HTTP methods.

  • Thanks 1

Share this post


Link to post
Share on other sites
1 hour ago, Oz Linden said:

LSL does do automatic redirection for GET (and HEAD) requests, but not for other HTTP methods.

That's what I figured. This is a  POST operation. The "user agent" is supposed to handle that redirection. Whether the LSL code or the underlying SL code is the "user agent" here is an interesting question. I'd argue that the underlying system should handle this, on the grounds that we can't afford to encapsulate HTTP requests in a library in LSL. Not in 64KB.

Share this post


Link to post
Share on other sites

Animats,  if you can open a feature request JIRA for following redirects on methods other than GET or HEAD so that it stays on our radar and we can take a bit of time to weigh the implications. 

Share this post


Link to post
Share on other sites
1 hour ago, Rider Linden said:

Animats,  if you can open a feature request JIRA for following redirects on methods other than GET or HEAD so that it stays on our radar and we can take a bit of time to weigh the implications. 

I could, but I don't want to distract the Lindens from more serious problems. This is something users can easily work around, once they know it's there.

I  have 16 JIRAs on file. In two years, no feature request JIRA of mine has ever been implemented, and no bug report JIRA of mine has ever been fixed. I would rate the priority of this below anything I have pending, and don't want to distract staff from the big problems users can't work around, such as region crossing failures.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...