Ticket #142 (new defect)

Opened 4 years ago

Last modified 3 months ago

Handling of url_base within device description

Reported by: Lawrence Assigned to: dev
Priority: major Milestone:
Component: Core Version:
Keywords: Cc:

Description

A device description may have an optional url_base attribute that specifies the base for any relative URLs, within the description. Use off the location may be used if not present. Also URLs given may be absolute and include the protocol and host name (http://...)

So in service the test for a URL starting with / is broken and automatically combining with location (named url_base) does not always work.

Attached is a patch that: i) checks for Urlbase in the description, ii) uses urljoin to generate full absolute URLs, iii) works these out at service object creation - inclduing the event sub url - hence the change in Event.

Note: It also adds some accessors to things like root_id/root_uuid. Adds format descriptros in some logging calls. And in service is some handling for state values that have multiple instances, i.e. volume.

Also attached the descrptions for a solwise DMP1120W (http://www.solwise.co.uk/dmp-1120w.html circa £85). This is itself is broken in its UPNP implementation and sends chunked encoded events.

Attachments

urlbase.patch (12.6 kB) - added by Lawrence on 08.06.2008 16:56:59.
patch file for service/device/event to handle urlBase
dma201.zip (4.8 kB) - added by Lawrence on 08.06.2008 16:58:35.
solwise DMP-1120w UPNP renderer.

Change History

08.06.2008 16:56:59 changed by Lawrence

  • attachment urlbase.patch added.

patch file for service/device/event to handle urlBase

08.06.2008 16:58:35 changed by Lawrence

  • attachment dma201.zip added.

solwise DMP-1120w UPNP renderer.