-
Notifications
You must be signed in to change notification settings - Fork 181
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
feat: Refactor unixfs #606
Conversation
d79bda0
to
bc7f4cd
Compare
c755db2
to
92f96a4
Compare
92f96a4
to
851820b
Compare
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.
Thank you for the deep work here. VERY subtle bugs you caught out.
And magnificent improvements on the seeking.
@@ -103,11 +103,14 @@ pub fn parse_range_header(range: &HeaderValue) -> Option<Range<u64>> { | |||
if start >= end || end == 0 { | |||
return None; | |||
} | |||
Some(Range { start, end }) | |||
Some(Range { |
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.
Ugh, this is a rough bug on my end.
ResponseClip::Clip(bytes_reader.bytes.len()), | ||
&bytes_reader.bytes, | ||
Some(bytes_reader.bytes.len()), | ||
&bytes_reader.bytes[pos_current..], |
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.
👍
* feat: Refactor unixfs * pr: fixes * fix: Document fix and correct default for absent gateway path * feat: Skip blocks on seeking
* feat: Refactor unixfs * pr: fixes * fix: Document fix and correct default for absent gateway path * feat: Skip blocks on seeking
ResponseClip
has been deleted but it is better to discuss. I did it because its semantics was not obvious, it was used for clipping both entire response and partial responses fromNode
with non-trivial transitions between them.Worth to note, now
Range
header with valuestart-end
translates to rust structRange
with valuesstart
andend + 1
.Range
in rust non-inclusive for right bound, it is more convinient.