Skip to content

fix: preserve base URL query parameters when joining paths - #114

Open
qirh wants to merge 1 commit into
mainfrom
fix/base-url-query-path
Open

qirh wants to merge 1 commit into
mainfrom
fix/base-url-query-path

Conversation

@qirh

@qirh qirh commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

A custom baseURL that contains a query string corrupts the endpoint path. buildURL concatenates the request path onto the full base URL string, so https://proxy.test/api?key=x plus /search becomes https://proxy.test/api?key=x/search: the request goes to /api with key=x/search.

This splits the base query off before joining paths, then merges it into the request query with the lowest precedence (base, then path, then defaultQuery, then per-request query). Absolute request paths are unchanged.

Same issue as perplexityai/perplexity-py#139.

Validation: new baseUrl > query parameters test fails before the change and passes after. bazel test //... passes (8/8), plus oxlint, oxfmt and Gazelle diff checks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants