-
Notifications
You must be signed in to change notification settings - Fork 10
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
fix: api permacache validate content length header #98
fix: api permacache validate content length header #98
Conversation
Deploying with Cloudflare Pages
|
b893863
to
37aa131
Compare
// Content length is mandatory given R2 needs a known size of the readable stream | ||
// TODO: We need public gateways to set content-length for JSON content (maybe others) | ||
// https://github.com/protocol/bifrost-infra/issues/1868 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See ipfs/kubo#8984
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @lidel ❤️
37aa131
to
c42e537
Compare
We decided to move forward with this solution for MVP until we have a way of buffering content in external service or a fix to get content length here. |
This PR Validates content length exists on response from gateway, given it is required by R2. If there is no content length, buffers it in memory and adds to R2 the new Response to get the content length
Related to https://github.com/protocol/bifrost-infra/issues/1868
TODO: