resolveControlUrl

Resolve the (possibly relative) <controlURL> against the device-description locationUrl and any advertised <URLBase>, exactly as on_upnp_xml does:

  • If a <URLBase> is present and the control URL is not already absolute (http://…), the two are concatenated, collapsing a double slash.

  • If the control URL is host-absolute (/path), it is rebased onto the scheme+host+port of locationUrl.

  • Otherwise the control URL is taken as-is (already absolute).