Fix Bug 59483 - Fix port parsing from amqp_uri (#529)
* Fix port parsing from amqp_uri * Correct regex for port parsing
This commit is contained in:
parent
a3973583f8
commit
d98eb758b5
@ -199,7 +199,7 @@ parse_rabbitmq_url(){
|
||||
# extract the host
|
||||
local hostport="$(echo ${url/$userpass@/} | cut -d/ -f1)"
|
||||
# by request - try to extract the port
|
||||
local port="$(echo $hostport | sed -e 's,^.*:,:,g' -e 's,.*:\([0-9]*\).*,\1,g' -e 's,[^0-9],,g')"
|
||||
local port="$(echo $hostport | grep : | sed -r 's_^.*:+|/.*$__g')"
|
||||
|
||||
local host
|
||||
if [ -n "$port" ]; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user