Speed-Test icon indicating copy to clipboard operation
Speed-Test copied to clipboard

saveDataURL / saveData - what type of backend is expected

Open falz opened this issue 2 years ago • 8 comments

In the config elemnts there's references to 'saving data' from a result:

var saveDataURL = "//yourDatabase.Server.com:4500/save?data=

Is this implemented, and if so what type of 'database' is it looking to send to on port 4500? per /etc/services this seems to not be a standard port for a known database server.

falz avatar Aug 30 '23 12:08 falz

Note I did find this issue: https://github.com/openspeedtest/Speed-Test/issues/10 which talks about a SQL database, but I see no code in the github page related to SQL, authentication, or any other 'usual' things one would expect when connecting to a SQL db.

falz avatar Aug 30 '23 12:08 falz

Yes, Script will make a POST request with some parameters and values. You need to handle the request at the server side (you need to write your own code at server side). We do not have official support for this feature yet.

openspeedtest avatar Aug 30 '23 15:08 openspeedtest

Thank you - do you have a sample of how this POST request is formatted?

I set saveDataURL to a FQDN and saveData = true and sniffed port 4500 (default) to see the format but I did not receive any results.

I also tried port 80 to see if it put a log entry in my httpd logs, but it did not.

clues to see what it's doing? Looking to see what data is sent to determine if I want to add a simple script to capture results.

Thanks!

falz avatar Aug 30 '23 15:08 falz

Enable it and look at the browser console to view the POST request. 4500 is just an example. You need to replace the URL with your own database handling URL, for example, yourdomain.com/savedata.php.

openspeedtest avatar Aug 30 '23 15:08 openspeedtest

I did also look in 'inspect' console but do not see it. per above I did set saveDataURL to a few different things to test, but no results. saveData = true - anything more than those two options?

Console screenshot, the last red error occurs (and continues to loop?) after test is complete. 'Developed by' shows up when one hits start.

Screenshot from 2023-08-30 10-57-40

Looks like the line refers to OpenSpeedTestdb perhaps it should instead be saveDataURL?

falz avatar Aug 30 '23 15:08 falz

Declare a variable named OpenSpeedTestdb and initialize it to 0. This is not related to this topic, but it is a known issue that I will fix very soon.

openspeedtest avatar Aug 30 '23 16:08 openspeedtest

Is the saveDataURL supposed to start with http:// or similar? the example starts with // which is weird.

falz avatar Aug 30 '23 17:08 falz

// This will match the protocol http or https used by the browser. You can also specify https://

openspeedtest avatar Aug 31 '23 00:08 openspeedtest