Merge pull request #960 from fjl/nat-fixes

p2p/nat: fix UPnP auto discovery
This commit is contained in:
Jeffrey Wilcke
2015-05-14 04:06:13 -07:00
142 changed files with 189479 additions and 25 deletions

View File

@@ -20,6 +20,8 @@ import (
"net/http"
"net/url"
"golang.org/x/net/html/charset"
"github.com/huin/goupnp/httpu"
"github.com/huin/goupnp/ssdp"
)
@@ -104,6 +106,7 @@ func requestXml(url string, defaultSpace string, doc interface{}) error {
decoder := xml.NewDecoder(resp.Body)
decoder.DefaultSpace = defaultSpace
decoder.CharsetReader = charset.NewReaderLabel
return decoder.Decode(doc)
}