tursodatabase/libsql

Use `/info` endpoint to probe the offline sync support (instead of `/sync`)

Closed this issue · 0 comments

Currently, client libraries send /sync/0/0/0 probe request to figure out if the server is turso-server or the libsql-server.

https://github.com/tursodatabase/libsql/blob/395b2ca/libsql/src/database/builder.rs#L375-L378

This is to check if the offline sync is supported by the upstream and only turso-server supports it.

However, /sync/0/0/0 is a hack and we should instead use /info endpoint. This endpoint is not supported on the libsql-server, so it serves the desired purpose of probing.