qdrant-js
qdrant-js copied to clipboard
refactor: parse default http ports in url, fixes #59
This change correctly parses default http ports in url for rest and grpc packages.
Thanks for looking @generall , @kartik-gupta-ij
For context, the url parser const parsedUrl = new URL(url); when used with urls having default ports (443 for https and 80 for http) returns empty string, which is mentioned in their docs as well. As a reult, when a user sends a url with 443 or 80, qdrant's default port gets used (6333 for rest and 6334 for grpc).
This change fixes this behavior. The issue was seen here - https://github.com/qdrant/qdrant-js/issues/59