Skip to content

Commit c74c3f4

Browse files
committed
update SSDP to respond to generic URN
1 parent 1d1cd9f commit c74c3f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lfs/ssdp_response.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ local function ssdpResponse(c, d, port, ip)
55
local device = require("device")
66
local info = node.info("sw_version")
77
local urn = d:match("ST: (urn:[%w%p]*)")
8-
if (urn == device.urn or string.match(d, "ST: ssdp:all")) then
8+
if (string.match(d, "ST:%s*ssdp:all") or (urn and device.urn:sub(1, #urn) == urn)) then
99
print("Heap: ", node.heap(), "Responding to UPnP Discovery request from " .. ip .. ":" .. port)
1010
local resp =
1111
"HTTP/1.1 200 OK\r\n" ..

0 commit comments

Comments
 (0)