update upnp description.xml response to come from root instead of

/upnp.....
This commit is contained in:
Admin
2015-08-25 16:42:30 -05:00
parent 3ea7f2903f
commit fa15cf3952
4 changed files with 4 additions and 4 deletions

View File

@@ -5,7 +5,7 @@
<groupId>com.bwssystems.HABridge</groupId> <groupId>com.bwssystems.HABridge</groupId>
<artifactId>ha-bridge</artifactId> <artifactId>ha-bridge</artifactId>
<version>0.3.1</version> <version>0.3.2</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>HA Bridge</name> <name>HA Bridge</name>

View File

@@ -100,7 +100,7 @@ public class UpnpListener {
String discoveryTemplate = "HTTP/1.1 200 OK\r\n" + String discoveryTemplate = "HTTP/1.1 200 OK\r\n" +
"CACHE-CONTROL: max-age=86400\r\n" + "CACHE-CONTROL: max-age=86400\r\n" +
"EXT:\r\n" + "EXT:\r\n" +
"LOCATION: http://%s:%s/upnp/ha-bridge/description.xml\r\n" + "LOCATION: http://%s:%s/description.xml\r\n" +
"SERVER: FreeRTOS/6.0.5, UPnP/1.0, IpBridge/0.1\r\n" + "SERVER: FreeRTOS/6.0.5, UPnP/1.0, IpBridge/0.1\r\n" +
"ST: urn:schemas-upnp-org:device:basic:1\r\n" + "ST: urn:schemas-upnp-org:device:basic:1\r\n" +
"USN: uuid:Socket-1_0-221438K0100073::urn:schemas-upnp-org:device:basic:1\r\n\r\n"; "USN: uuid:Socket-1_0-221438K0100073::urn:schemas-upnp-org:device:basic:1\r\n\r\n";

View File

@@ -45,7 +45,7 @@ public class UpnpSettingsResource {
private void setupListener (BridgeSettings theSettings) { private void setupListener (BridgeSettings theSettings) {
// http://ip_address:port/upnp/:id/description.xml which returns the xml configuration for the location of the hue emulator // http://ip_address:port/upnp/:id/description.xml which returns the xml configuration for the location of the hue emulator
get(UPNP_CONTEXT + "/:id/description.xml", "application/xml", (request, response) -> { get("/description.xml", "application/xml", (request, response) -> {
log.info("upnp device settings requested: " + request.params(":id") + " from " + request.ip()); log.info("upnp device settings requested: " + request.params(":id") + " from " + request.ip());
String portNumber = Integer.toString(request.port()); String portNumber = Integer.toString(request.port());
String filledTemplate = String.format(hueTemplate, theSettings.getUpnpConfigAddress(), portNumber, theSettings.getUpnpConfigAddress()); String filledTemplate = String.format(hueTemplate, theSettings.getUpnpConfigAddress(), portNumber, theSettings.getUpnpConfigAddress());

View File

@@ -41,7 +41,7 @@
<ul class="dropdown-menu" aria-labelledby="dropdownMenu1"> <ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
<li><a href="http://www.bwssystems.com" target="_blank">Developed by BWS Systems</a></li> <li><a href="http://www.bwssystems.com" target="_blank">Developed by BWS Systems</a></li>
<li><a href="http://www.amazon.com/echo" target="_blank">Amazon Echo</a></li> <li><a href="http://www.amazon.com/echo" target="_blank">Amazon Echo</a></li>
<li><a href="#">HA Bridge Version 0.3.1</a></li> <li><a href="#">HA Bridge Version 0.3.2</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>