Skip to content

upnp: fix exposed directory URLS

Alaric Senat requested to merge asenat/vlc:upnp-url into master

Previous implementation generated input item directories with URLs not compliant with RFC 3986 in an attempt to keep the original URL while triggering the UPNP directory acces properly. Here's an exemple of a previous upnp directory url:

upnp://http://192.168.1.109:32469/cds?ObjectID=0

The stacking of schemes (upnp://http://) is problematic and leads to most of the validators failing on those generated URLs (see the referenced issue).

This patch fix the issue by simply replacing the original http:// scheme by upnp:// instead of stacking both. To avoid any potential regression with some obscure usage forcing https, a shortcut of the directory access is introduced for https specificaly.

The example above would then be fixed like that:

upnp://192.168.1.109:32469/cds?ObjectID=0

Potential use-cases with https would instead generate the following:

upnps://192.168.1.109:32469/cds?ObjectID=0

Refs VLCKit#728 (closed)

Edited by Alaric Senat

Merge request reports

Loading