Check-in [f6f7e5b691]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:- Specify the correct content type when invoking control commands.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:f6f7e5b691984bc24470008c566d6924f5dbbcf8
User & Date: schelte 2014-08-27 15:39:37
Context
2015-01-10
15:16
- Update to version 0.2 - Fix some typos - Work with non-hex UUID's - Let the code determine the IP address instead of hardcoding it - Handle failures to get XML files and XML with UTF8 BOM Leaf check-in: 5a240508f4 user: schelte tags: trunk
2014-08-27
15:39
- Specify the correct content type when invoking control commands. check-in: f6f7e5b691 user: schelte tags: trunk
15:38
- Get rid of hard-coded path to icons. check-in: 84f33b6654 user: schelte tags: trunk
Changes

Changes to upnp.tcl.

178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
}

proc upnp::control {service url name argnames argvals} {
    set nss http://schemas.xmlsoap.org/soap/envelope/
    set soap [soap $service $name $argnames $argvals]
    lappend hdrs SOAPACTION [format {"%s"} $service#$name]
    http::config -useragent [ssdp agent]
    set tok [geturl $url -headers $hdrs -query $soap]
    dom parse [http::data $tok] doc
    http::cleanup $tok
    $doc selectNodesNamespaces [list s $nss u $service]
    set res [$doc selectNodes /s:Envelope/s:Body/u:${name}Response]
    set rc {}
    foreach n [$res childNodes] {
	dict set rc [$n nodeName] [$n text]







|







178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
}

proc upnp::control {service url name argnames argvals} {
    set nss http://schemas.xmlsoap.org/soap/envelope/
    set soap [soap $service $name $argnames $argvals]
    lappend hdrs SOAPACTION [format {"%s"} $service#$name]
    http::config -useragent [ssdp agent]
    set tok [geturl $url -type text/xml -headers $hdrs -query $soap]
    dom parse [http::data $tok] doc
    http::cleanup $tok
    $doc selectNodesNamespaces [list s $nss u $service]
    set res [$doc selectNodes /s:Envelope/s:Body/u:${name}Response]
    set rc {}
    foreach n [$res childNodes] {
	dict set rc [$n nodeName] [$n text]