Skip to content

fix: stucked byte range requests#462

Merged
DimaDemchenko merged 3 commits intoNovage:mainfrom
Chocobozzz:fix/byte-range
Feb 6, 2025
Merged

fix: stucked byte range requests#462
DimaDemchenko merged 3 commits intoNovage:mainfrom
Chocobozzz:fix/byte-range

Conversation

@Chocobozzz
Copy link
Copy Markdown
Contributor

Due to an invalid check, the request throws even if it is valid.

total from parseContentRangeHeader is the total amount of bytes of the stream but totalBytes from request is the total amount of bytes of the request that we can infer from to and from

Due to an invalid check, the request throws even if it is valid.

`total` from `parseContentRangeHeader` is the total amount of bytes of
the stream but `totalBytes` from `request` is the total amount of bytes
of the request that we can infer from `to` and `from`
@mrlika mrlika requested a review from DimaDemchenko February 5, 2025 20:27
Copy link
Copy Markdown
Contributor

@DimaDemchenko DimaDemchenko left a comment

Choose a reason for hiding this comment

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

Hi @Chocobozzz,
Thank you for reporting this bug! We have found a better way to validate the contentRange from the response. Could you please update your PR accordingly?

Comment thread packages/p2p-media-loader-core/src/http-loader.ts Outdated
Comment thread packages/p2p-media-loader-core/src/http-loader.ts Outdated
Chocobozzz and others added 2 commits February 6, 2025 15:40
Co-authored-by: Dmytro Demchenko <ipz215_ddo@student.ztu.edu.ua>
Co-authored-by: Dmytro Demchenko <ipz215_ddo@student.ztu.edu.ua>
@Chocobozzz
Copy link
Copy Markdown
Contributor Author

Sure! It's done. You can squash the PR or I can do it manually if you prefer

@DimaDemchenko DimaDemchenko merged commit b26df75 into Novage:main Feb 6, 2025
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

Successfully merging this pull request may close these issues.

3 participants