minio-cpp
minio-cpp copied to clipboard
Fix parsing of ports inside the URI
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