dosubot[bot] commented on issue #3004: URL: https://github.com/apache/hugegraph/issues/3004#issuecomment-4301676715
<!-- Answer --> Good bug report, @bitflicker64 — this is clearly the same issue @mywgl reported in #3001 [[1]](https://github.com/apache/hugegraph/issues/3001), and your analysis and proposed fix look correct. Confirming the current state: all three `check_port` functions still use the broken `awk -F':' '{print $3}'` extraction [[2]](https://github.com/apache/hugegraph/blob/9126c80e414c073b60fc074361b211cfb409e0eb/hugegraph-server/hugegraph-dist/src/assembly/static/bin/util.sh#L83-L94) [[3]](https://github.com/apache/hugegraph/blob/9126c80e414c073b60fc074361b211cfb409e0eb/hugegraph-pd/hg-pd-dist/src/assembly/static/bin/util.sh#L85-L96) [[4]](https://github.com/apache/hugegraph/blob/9126c80e414c073b60fc074361b211cfb409e0eb/hugegraph-store/hg-store-dist/src/assembly/static/bin/util.sh#L84-L95), and no fix has been merged yet. The bug was exposed by #2944, which allowed scheme-less URLs like `127.0.0.1:8080` as the default `restserver.url` [[5]](https://github.com/apache/incubator-hugegraph/pull/2944). Your proposed `sed` fix handles all the edge cases (trailing slash, IPv6, path suffixes) more robustly than the `awk -F':' '{print $NF}'` workaround @mywgl suggested in #3001. A PR with this fix across all three `util.sh` files would be welcome. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fhugegraph).* --- Docs are dead. Just use [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-tagline&utm_term=apache%2Fhugegraph). [](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-feedback&utm_term=apache%2Fhugegraph#message_id=c61bb389-0ee1-4209-8eb4-0a974ff5c8fb) [](https://github.dosu.com/apache/hugegraph?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-ask-repo&utm_term=apache%2Fhugegraph) [](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-share-team&utm_term=apache%2Fhugegraph) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
