From 7c6fb018cad3fcefd5006b3baaf8f7696879ab29 Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Wed, 28 May 2014 16:04:20 +0200 Subject: [PATCH] Fix UPnP line endings (ref #211) --- upnp/upnp.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/upnp/upnp.go b/upnp/upnp.go index 9de719aa5..6e11bf79d 100644 --- a/upnp/upnp.go +++ b/upnp/upnp.go @@ -60,14 +60,14 @@ func Discover() (*IGD, error) { return nil, err } - search := []byte(` -M-SEARCH * HTTP/1.1 + searchStr := `M-SEARCH * HTTP/1.1 Host: 239.255.255.250:1900 St: urn:schemas-upnp-org:device:InternetGatewayDevice:1 Man: "ssdp:discover" Mx: 3 -`) +` + search := []byte(strings.Replace(searchStr, "\n", "\r\n", -1)) _, err = socket.WriteTo(search, ssdp) if err != nil {