UPnP fixes part 6:

Fix malformed HTTP requests
Check HTTP response code in Parser
Check content type in Parser
Debug log in Parser
Show device URL in CLI
Don't retry after parser exception
Close resources in finally block
This commit is contained in:
zzz
2020-05-22 18:22:56 +00:00
parent a3fc8af1dd
commit 6aa81f7ec6
3 changed files with 53 additions and 13 deletions

View File

@@ -1634,6 +1634,9 @@ public class UPnP extends ControlPoint implements DeviceChangeListener, EventLis
": " + DataHelper.escapeHTML(device.getFriendlyName()) + "</h3>");
System.out.println("<p>UDN: " + DataHelper.escapeHTML(device.getUDN()));
System.out.println("<br>IP: " + getIP(device));
String loc = device.getLocation();
if (loc != null && loc.length() > 0)
System.out.println("<br>URL: <a href=\"" + loc + "\">" + loc + "</a>");
System.out.println(sb.toString());
sb.setLength(0);
}