tursodatabase / tursodatabase/libsql-client-ts

client strips last url path segment

Open
#296 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
576
Forks
69
PR merge metrics
No merged PRs in 30d

Description

While I bet this is not the intended usage, I've come to like libsql for the ability to be hosted (through a proxy of some sorts) on a single subdomain because the clients happily accept a path in the URL. However, this client in particular splits off the last segment, which all others dont. For example, libsql://example.com/some/sub/path causes the proxy to recieve a request at https://example.com/some/sub (or well, a subpath of said url, so https://example.com/some/sub/v2/pipeline or alike).

The other clients don't seem to do this, so I'm just gonna claim it is a bug in this client and not a result of me messing with something proabably not even intended :)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the TypeScript client code that parses the libsql:// URL and constructs the request endpoint. Reproduce the example with /some/sub/path, compare the resulting request path with the other clients, and consider the issue done when the full URL path is preserved in the request.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.