Skip to content

Commit

Permalink
Add user-agent header, capitalize headers as others seems to do it (f…
Browse files Browse the repository at this point in the history
…ixes #2422)
  • Loading branch information
AudriusButkevicius committed Oct 31, 2015
1 parent b4bbd05 commit 2aa028f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/upnp/upnp.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,11 @@ func discover(intf *net.Interface, deviceType string, timeout time.Duration, res
ssdp := &net.UDPAddr{IP: []byte{239, 255, 255, 250}, Port: 1900}

tpl := `M-SEARCH * HTTP/1.1
Host: 239.255.255.250:1900
St: %s
Man: "ssdp:discover"
Mx: %d
HOST: 239.255.255.250:1900
ST: %s
MAN: "ssdp:discover"
MX: %d
USER-AGENT: syncthing/1.0
`
searchStr := fmt.Sprintf(tpl, deviceType, timeout/time.Second)
Expand Down

0 comments on commit 2aa028f

Please sign in to comment.