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

refactor: multi range request considers servers that do not return multi range #113

Merged
merged 8 commits into from
Jul 31, 2023

Conversation

hacdias
Copy link
Member

@hacdias hacdias commented Jul 26, 2023

This PR updates the multi range request such that it counts for servers that are not able to reply with a multi range. When the client asks for a range request 3 things might happen:

  1. Server replies with multipart response with multipart/byteranges as Content-Type. Includes both ranges.
  2. Server replies with the Content-Type of the actual data and the Content-Range header with the first range. Body has first range body.
  3. Server replies with Content-Type of actual data, no Content-Range. Body has full file.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Range_requests

@hacdias hacdias force-pushed the multirequest-as-per-http-standards branch from cb7fa3d to 26922e9 Compare July 26, 2023 13:23
@hacdias hacdias marked this pull request as ready for review July 26, 2023 13:23
@hacdias hacdias requested a review from aschmahmann July 26, 2023 13:25
Copy link
Contributor

@laurentsenta laurentsenta left a comment

Choose a reason for hiding this comment

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

👍

@BigLep
Copy link

BigLep commented Jul 27, 2023

2023-07-27 conversation: this is connected to the backpressure work. This will get merged after @lidel takes a look.

Copy link
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

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

@hacdias once below is addressed, lgtm

tests/path_gateway_raw_test.go Show resolved Hide resolved
@hacdias hacdias force-pushed the multirequest-as-per-http-standards branch from c029dbc to 517e9e3 Compare July 31, 2023 08:54
@hacdias hacdias merged commit 41d81de into main Jul 31, 2023
21 of 24 checks passed
@hacdias hacdias deleted the multirequest-as-per-http-standards branch July 31, 2023 09:11
@hacdias
Copy link
Member Author

hacdias commented Jul 31, 2023

@laurentsenta can we get this released to unblock work on ipfs/boxo#369? We want to run the new tests in Boxo and Kubo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants