Skip to content
This repository was archived by the owner on Jun 27, 2023. It is now read-only.

fix(dagreader): remove a buggy workaround for a gateway issue#80

Merged
Stebalien merged 2 commits intomasterfrom
fix/gateway-workaround
Jan 6, 2020
Merged

fix(dagreader): remove a buggy workaround for a gateway issue#80
Stebalien merged 2 commits intomasterfrom
fix/gateway-workaround

Conversation

@Stebalien
Copy link
Copy Markdown
Member

We had a hack that "pretended" seeking worked when it didn't as go's HTTP
library uses seeks to determine the file size. However,

  1. I'm changing the gateway to actually rely on seeking working as specified.
  2. We don't even need this hack. The gateway performs two types of seeks (unless
    a range query is passed):
    1. It seeks to the beginning. We can always shortcut this.
    2. It seeks to the end. The gateway now has a special "lazy" seeker to avoid
      seeking until we actually try to read. Therefore, we don't need a hack
      for that either.

We had a hack that "pretended" seeking worked when it didn't as go's HTTP
library uses seeks to determine the file size. However,

1. I'm changing the gateway to actually rely on seeking working as specified.
2. We don't even need this hack. The gateway performs two types of seeks (unless
   a range query is passed):
    1. It seeks to the beginning. We can always shortcut this.
    2. It seeks to the end. The gateway now has a special "lazy" seeker to avoid
      seeking until we actually try to _read_. Therefore, we don't need a hack
      for that either.
@Stebalien Stebalien requested a review from dirkmc January 4, 2020 03:09
@Stebalien
Copy link
Copy Markdown
Member Author

This fixes the test failure in ipfs/kubo#6680 (and probably other misc bugs).

Copy link
Copy Markdown

@dirkmc dirkmc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@Stebalien Stebalien merged commit da35b26 into master Jan 6, 2020
@Stebalien Stebalien deleted the fix/gateway-workaround branch January 6, 2020 00:38
Jorropo pushed a commit to Jorropo/go-libipfs that referenced this pull request Jan 25, 2023
fix(dagreader): remove a buggy workaround for a gateway issue

This commit was moved from ipfs/go-unixfs@da35b26
Jorropo pushed a commit to ipfs/go-libipfs-rapide that referenced this pull request Mar 23, 2023
fix(dagreader): remove a buggy workaround for a gateway issue

This commit was moved from ipfs/go-unixfs@da35b26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants