srmclient: fix support for URLs with IPv6 address

a bit of DRY, but have to be solved more globally.

Ticket: #8248
Acked-by: Dmitry Litvintsev
Target: master
Require-book: no
Require-notes: no