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

CID bafkqaaa causes error: cannot detect content-type: EOF #8230

Closed
2 tasks done
lidel opened this issue Jun 30, 2021 · 4 comments
Closed
2 tasks done

CID bafkqaaa causes error: cannot detect content-type: EOF #8230

lidel opened this issue Jun 30, 2021 · 4 comments
Assignees
Labels
effort/hours Estimated to take one or several hours kind/bug A bug in existing code (including security flaws) P0 Critical: Tackled by core team ASAP status/in-progress In progress topic/gateway Topic gateway

Comments

@lidel
Copy link
Member

lidel commented Jun 30, 2021

Originally reported by Brave: brave/brave-browser#16671

go-ipfs 0.9.0 updated mimetype dep https://github.com/gabriel-vasile/mimetype and that introduced regression on gateway when an empty byte array payload is returned to the user.

Unfortunately, that edge case changes HTTP response for CID bafkqaaa which we use in various places.

  • In v0.8.0 it was empty body with HTTP 200 (ok) status code
  • In v0.9.0 it returns cannot detect content-type: EOF with HTTP 500 error

TODO

@lidel lidel added kind/bug A bug in existing code (including security flaws) status/in-progress In progress topic/gateway Topic gateway P0 Critical: Tackled by core team ASAP effort/hours Estimated to take one or several hours labels Jun 30, 2021
@aschmahmann
Copy link
Contributor

Switching back to 1.1.2 #8229

@lidel
Copy link
Member Author

lidel commented Jun 30, 2021

Sharness test #8232

@gabriel-vasile
Copy link

Hi,

We were at 1.1.2 in v0.8.0 the latest is v1.3.0 which seems ok, and v1.2.0 is what we have and has the behavior change

I'm pretty sure v1.3.0 is not ok. The offending change is gabriel-vasile/mimetype@b1ae8bf#diff-cf06cf150d88adb18fa7da76b698e820f978ae9b6c547b3530305051e6687459L44
I'll add the missing err != io.EOF and release it as v.1.3.1.

lidel added a commit that referenced this issue Jun 30, 2021
aschmahmann pushed a commit that referenced this issue Jun 30, 2021
@gabriel-vasile
Copy link

v1.3.1 is out and it behaves like 1.1.2.
the change

lidel added a commit to ipfs/ipfs-webui that referenced this issue Jul 5, 2021
aschmahmann pushed a commit that referenced this issue Jul 16, 2021
Context: #8230
(cherry picked from commit fcfe793)
@aschmahmann aschmahmann mentioned this issue Jul 16, 2021
18 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort/hours Estimated to take one or several hours kind/bug A bug in existing code (including security flaws) P0 Critical: Tackled by core team ASAP status/in-progress In progress topic/gateway Topic gateway
Projects
None yet
Development

No branches or pull requests

3 participants