qdrant-js icon indicating copy to clipboard operation
qdrant-js copied to clipboard

refactor: parse default http ports in url, fixes #59

Open harshalmittal4 opened this issue 1 year ago • 1 comments

This change correctly parses default http ports in url for rest and grpc packages.

harshalmittal4 avatar Feb 03 '24 07:02 harshalmittal4

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

harshalmittal4 avatar Mar 07 '24 17:03 harshalmittal4