Skip to content

Commit

Permalink
Merge pull request #143 from DMTF/Fix142-SSDP-Fix
Browse files Browse the repository at this point in the history
Added missing new line in M-SEARCH request
  • Loading branch information
mraineri committed Jul 27, 2023
2 parents bb139a9 + 6f4eece commit 9b56398
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/redfish/discovery/discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def discover_ssdp(port=1900, ttl=2, response_time=3, iface=None, protocol="ipv4"
"Host: {}:{}\r\n"
'Man: "ssdp:discover"\r\n'
"ST: urn:dmtf-org:service:redfish-rest:1\r\n"
"MX: {}\r\n"
"MX: {}\r\n\r\n"
).format(mcast_ip, port, response_time)
socket.setdefaulttimeout(response_time + 2)

Expand All @@ -99,7 +99,7 @@ def discover_ssdp(port=1900, ttl=2, response_time=3, iface=None, protocol="ipv4"
# On the same socket, wait for responses
discovered_services = {}
pattern = re.compile(
"^uuid:([a-f0-9\-]*)::urn:dmtf-org:service:redfish-rest:1(:\d)?$") # noqa
"^uuid:([a-f0-9\-]*)::urn:dmtf-org:service:redfish-rest:1(:\d+)?$") # noqa
while True:
try:
response = http.client.HTTPResponse(FakeSocket(sock.recv(1024)))
Expand Down

0 comments on commit 9b56398

Please sign in to comment.