Skip to content

UPnP database plugin doesn't work when server returns full URLs #2450

@ypopovych

Description

@ypopovych

Bug report

Describe the bug

UPnP database plugin throws exceptions when UPnP server returns XML response with full URL instead of the path.

I tried to debug the exception and find out that action URL is broken. It looks like http://192.168.1.2/..../http://192.168.1.2/..... Seems as server returns full URLs inside XML responses, but UPnP in MPD expects a path instead of full URL and do a concat on it even if it starts with http://.

Seems as problem is in this line:

:m_actionURL(uri_apply_base(service.controlURL, device.URLBase)),

It applies base for URL even when service.controlURL is a full URL with server and scheme.

Expected Behavior

MPD can browse UPnP server contents.

Actual Behavior

UPnP database plugin throws errors on attempt to open server. MPD can't load content from the server.

Version

0.24.9

Configuration

database {
    plugin "upnp"
}

neighbors {
    plugin "upnp"
}

Log

UpnpSendAction() failed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions