Page 1 of 1

llHTTPRequest not working with webpage on port 80

Posted: Sun Mar 07, 2021 1:51 pm
by Ahmed Hazyl
Hi!

I have two http server scripts running on two different worlds, both of which communicate with an external server (they basically use it as a web proxy to route requests from web clients). One of them has stopped working; I did some troubleshooting and found that it is unable to send an llHTTPRequest to the server using port 80.

The line in question (actual URL replaced with "myurl" for privacy reasons) is:

llHTTPRequest("http://myurl.com:80/" + url + "DSAUCE", [], "");

The second script, which still works, sends an llHTTPRequest to the same server except using port 8080.

llHTTPRequest("http://myurl.com:8080/" + url + "DSAUCE", [], "");

No difference between the two scripts except for this. The script which communicates with the server using port 80 worked as of November 2020. I haven't used it in a while and just tried running it today. Is there any known reason why this might happen? Or what I can do to get my script working again?

Re: llHTTPRequest not working with webpage on port 80

Posted: Sun Mar 07, 2021 2:08 pm
by Ilan Tochner
Hi Ahmed,

Can you please quote the exact error message you're getting when you're trying to use these two function calls?

Re: llHTTPRequest not working with webpage on port 80

Posted: Sun Mar 07, 2021 2:35 pm
by Ahmed Hazyl
Hi Ilan!

The script itself runs without an error, but the http response from the llHTTPRequest is:

Error code 499. Error body: The operation has timed out.

Also, from checking the external server I can see that the HTTP Request was not received by it.

Re: llHTTPRequest not working with webpage on port 80

Posted: Sun Mar 07, 2021 2:49 pm
by Ilan Tochner
Error code 499 is an error that Nginx returns when the client (OpenSim in this case) closes the connection before Nginx has completed processing the request. See: https://httpstatuses.com/499

I suggest you try calling your REST API from outside OpenSim to see if you get a different result. Make sure to make the call from outside the network where your server is hosted.