qdrant-client
qdrant-client copied to clipboard
fix(api_client): update path handling for hosts with subpaths
Fix URL joining logic to ensure correct path resolution for API requests.
Previously, using urljoin could result in incorrect URLs if the host ended with a path and the formatted url started with a leading slash. For example, a host like https://abc.com/api/qdrant combined with url.format(**path_params) producing "/collections" would incorrectly resolve to "https://abc.com/collections".
To address this, the host is now stripped of any leading slashes and ensured to end with a single /, while the url is stripped of leading slashes. This ensures the resulting URL maintains the expected path hierarchy:
Example fix:
"https://abc.com/api/qdrant" + "/collections" -> "https://abc.com/api/qdrant/collections"
Deploy Preview for poetic-froyo-8baba7 ready!
| Name | Link |
|---|---|
| Latest commit | e29b68ff412789e5cf79518f16239a20f4034f1b |
| Latest deploy log | https://app.netlify.com/sites/poetic-froyo-8baba7/deploys/67b4bc1f40b66400084601ee |
| Deploy Preview | https://deploy-preview-904--poetic-froyo-8baba7.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
I would highly appreciate if this fix can be merged. This is behavior is blocking our Qdrant adoption, as all our URLs will contain path prefixes.