mirror of
https://github.com/syncthing/syncthing.git
synced 2024-11-16 02:18:44 -07:00
Don't crash on error response to UPnP query (fixes #226)
This commit is contained in:
parent
40c750141a
commit
78f0f2b131
@ -87,6 +87,9 @@ Mx: 3
|
||||
reader := bufio.NewReader(bytes.NewBuffer(resp[:n]))
|
||||
request := &http.Request{}
|
||||
response, err := http.ReadResponse(reader, request)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if response.Header.Get("St") != "urn:schemas-upnp-org:device:InternetGatewayDevice:1" {
|
||||
return nil, errors.New("no igd")
|
||||
|
Loading…
Reference in New Issue
Block a user