minio-cpp icon indicating copy to clipboard operation
minio-cpp copied to clipboard

Fix parsing of ports inside the URI

Open flokaiser opened this issue 1 year ago • 0 comments

without this change, urls like 5.my.s3.cluster were misinterpreted and the '5' parsed as the port of the url.

Bug:

  • the getline() function puts the entire input string into the destination string, if the delimiter was not found. This leads to the entire host string being fed to the stoi() function to parse the port.

Fix:

  • If the portstr is equal to the host string, no ':port' was encountered. => Skip the parsing of the port

flokaiser avatar Jul 12 '24 08:07 flokaiser