diff --git a/core/corehttp/gateway_test.go b/core/corehttp/gateway_test.go index d7e5a8be7..a2a77d1c5 100644 --- a/core/corehttp/gateway_test.go +++ b/core/corehttp/gateway_test.go @@ -21,7 +21,7 @@ import ( config "github.com/ipfs/go-ipfs-config" files "github.com/ipfs/go-ipfs-files" path "github.com/ipfs/go-path" - "github.com/ipfs/interface-go-ipfs-core" + iface "github.com/ipfs/interface-go-ipfs-core" "github.com/ipfs/interface-go-ipfs-core/options" nsopts "github.com/ipfs/interface-go-ipfs-core/options/namesys" ci "github.com/libp2p/go-libp2p-crypto" @@ -219,11 +219,12 @@ func TestGatewayGet(t *testing.T) { if contentType != "text/plain; charset=utf-8" { t.Errorf("expected content type to be text/plain, got %s", contentType) } + body, err := ioutil.ReadAll(resp.Body) if resp.StatusCode != test.status { t.Errorf("(%d) got %d, expected %d from %s", i, resp.StatusCode, test.status, urlstr) + t.Errorf("Body: %s", body) continue } - body, err := ioutil.ReadAll(resp.Body) if err != nil { t.Fatalf("error reading response from %s: %s", urlstr, err) } diff --git a/core/corehttp/ipns_hostname.go b/core/corehttp/ipns_hostname.go index d5512779b..1c926dca1 100644 --- a/core/corehttp/ipns_hostname.go +++ b/core/corehttp/ipns_hostname.go @@ -9,8 +9,8 @@ import ( core "github.com/ipfs/go-ipfs/core" namesys "github.com/ipfs/go-ipfs/namesys" + isd "github.com/gxed/go-is-domain" nsopts "github.com/ipfs/interface-go-ipfs-core/options/namesys" - isd "github.com/jbenet/go-is-domain" ) // IPNSHostnameOption rewrites an incoming request if its Host: header contains diff --git a/go.mod b/go.mod index 89386383f..dfe580200 100644 --- a/go.mod +++ b/go.mod @@ -13,6 +13,7 @@ require ( github.com/fatih/color v1.7.0 // indirect github.com/fsnotify/fsnotify v1.4.7 github.com/gogo/protobuf v1.2.1 + github.com/gxed/go-is-domain v0.0.0-20160921144106-bcb935f9c56d github.com/hashicorp/golang-lru v0.5.1 github.com/hsanjuan/go-libp2p-gostream v0.0.0-20190227195646-68f5153d3e40 // indirect github.com/hsanjuan/go-libp2p-http v0.0.0-20190227195650-43dc52949539 diff --git a/go.sum b/go.sum index 64a932420..7562fcd9a 100644 --- a/go.sum +++ b/go.sum @@ -72,6 +72,8 @@ github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGa github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/websocket v1.4.0 h1:WDFjx/TMzVgy9VdMMQi2K2Emtwi2QcUQsztZ/zLaH/Q= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gxed/go-is-domain v0.0.0-20160921144106-bcb935f9c56d h1:eIqPbEsH4GABu64Vsbe1OzTrHD3z3SKaL9vEG9FnW6I= +github.com/gxed/go-is-domain v0.0.0-20160921144106-bcb935f9c56d/go.mod h1:cCBMcTE/W8VcVst8Jz0NZl7F3VPUTbmExWqGH0onVqk= github.com/gxed/go-shellwords v1.0.3 h1:2TP32H4TAklZUdz84oj95BJhVnIrRasyx2j1cqH5K38= github.com/gxed/go-shellwords v1.0.3/go.mod h1:N7paucT91ByIjmVJHhvoarjoQnmsi3Jd3vH7VqgtMxQ= github.com/gxed/hashland/keccakpg v0.0.1 h1:wrk3uMNaMxbXiHibbPO4S0ymqJMm41WiudyFSs7UnsU=