swarm/api/http: fixed resolver bug (#17483)
This commit is contained in:
parent
2993fb519d
commit
f34f361ca6
@ -820,7 +820,7 @@ func (s *Server) HandleGetFile(w http.ResponseWriter, r *http.Request) {
|
|||||||
manifestAddr := uri.Address()
|
manifestAddr := uri.Address()
|
||||||
|
|
||||||
if manifestAddr == nil {
|
if manifestAddr == nil {
|
||||||
manifestAddr, err = s.api.ResolveURI(r.Context(), uri, credentials)
|
manifestAddr, err = s.api.Resolve(r.Context(), uri.Addr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
getFileFail.Inc(1)
|
getFileFail.Inc(1)
|
||||||
RespondError(w, r, fmt.Sprintf("cannot resolve %s: %s", uri.Addr, err), http.StatusNotFound)
|
RespondError(w, r, fmt.Sprintf("cannot resolve %s: %s", uri.Addr, err), http.StatusNotFound)
|
||||||
|
Loading…
Reference in New Issue
Block a user