Przeglądaj źródła

swarm/api/http: bzz-immutable wrong handler bug (#17602)

Elad 7 lat temu
rodzic
commit
8b9b149d54
2 zmienionych plików z 2 dodań i 2 usunięć
  1. 1 1
      swarm/api/http/server.go
  2. 1 1
      swarm/api/http/server_test.go

+ 1 - 1
swarm/api/http/server.go

@@ -129,7 +129,7 @@ func NewServer(api *api.API, corsString string) *Server {
 	})
 	mux.Handle("/bzz-immutable:/", methodHandler{
 		"GET": Adapt(
-			http.HandlerFunc(server.HandleGet),
+			http.HandlerFunc(server.HandleBzzGet),
 			defaultMiddlewares...,
 		),
 	})

+ 1 - 1
swarm/api/http/server_test.go

@@ -672,7 +672,7 @@ func testBzzGetPath(encrypted bool, t *testing.T) {
 
 	nonhashresponses := []string{
 		`cannot resolve name: no DNS to resolve name: "name"`,
-		`cannot resolve nonhash: immutable address not a content hash: "nonhash"`,
+		`cannot resolve nonhash: no DNS to resolve name: "nonhash"`,
 		`cannot resolve nonhash: no DNS to resolve name: "nonhash"`,
 		`cannot resolve nonhash: no DNS to resolve name: "nonhash"`,
 		`cannot resolve nonhash: no DNS to resolve name: "nonhash"`,