bee icon indicating copy to clipboard operation
bee copied to clipboard

Permanent redirect when data is not found

Open agazso opened this issue 3 years ago • 0 comments

Context

Bee 1.7.0, macOS

Summary

I was trying to open the swarm website on my Bee node. It was not found (that's a different issue) however I ended up in a redirect loop.

Expected behavior

I expect that when I open data that is not found then I don't get a redirect loop, but rather an error message.

Actual behavior

% curl -v http://localhost:1633/bzz/swarm.eth/
*   Trying 127.0.0.1:1633...
* Connected to localhost (127.0.0.1) port 1633 (#0)
> GET /bzz/swarm.eth/ HTTP/1.1
> Host: localhost:1633
> User-Agent: curl/7.83.1
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 308 Permanent Redirect
< Content-Type: text/html; charset=utf-8
< Location: /bzz/swarm.eth/
< Date: Tue, 16 Aug 2022 15:40:25 GMT
< Content-Length: 51
< 
<a href="/bzz/swarm.eth/">Permanent Redirect</a>.
Screenshot 2022-08-16 at 17 45 12

Most likely this problem is coming from here: https://github.com/ethersphere/bee/blob/5c02037e045a9dc30d7d5d3ab7ddc95f2bc43248/pkg/api/bzz.go#L364

agazso avatar Aug 16 '22 15:08 agazso