mirror of
https://github.com/octoleo/syncthing.git
synced 2025-01-22 22:58:25 +00:00
Add user-agent header, capitalize headers as others seems to do it (fixes #2422)
This commit is contained in:
parent
b4bbd050c2
commit
2aa028facb
@ -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}
|
ssdp := &net.UDPAddr{IP: []byte{239, 255, 255, 250}, Port: 1900}
|
||||||
|
|
||||||
tpl := `M-SEARCH * HTTP/1.1
|
tpl := `M-SEARCH * HTTP/1.1
|
||||||
Host: 239.255.255.250:1900
|
HOST: 239.255.255.250:1900
|
||||||
St: %s
|
ST: %s
|
||||||
Man: "ssdp:discover"
|
MAN: "ssdp:discover"
|
||||||
Mx: %d
|
MX: %d
|
||||||
|
USER-AGENT: syncthing/1.0
|
||||||
|
|
||||||
`
|
`
|
||||||
searchStr := fmt.Sprintf(tpl, deviceType, timeout/time.Second)
|
searchStr := fmt.Sprintf(tpl, deviceType, timeout/time.Second)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user