Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly detect 404 responses from Swarm gateway #18

Open
hynek-urban opened this issue Jun 5, 2018 · 0 comments
Open

Properly detect 404 responses from Swarm gateway #18

hynek-urban opened this issue Jun 5, 2018 · 0 comments

Comments

@hynek-urban
Copy link
Contributor

The detection of 404 errors (non-existent records) is based on comparing a specific string with the swarm response body. This is not very robust and it stopped working when using the latest version of swarm (1.8.10) as their response body for HTTP 404 has changed.

Response status code should be checked instead.

How to reproduce it:

  1. Run the latest swarm locally.
  2. Try downloading a non-existent hash via bzz-raw using the swarm-js library.
  3. The whole markup of the response will be returned instead of an error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant