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

Add redirection support #107

Merged
merged 2 commits into from
Nov 8, 2023
Merged

Conversation

nathantalewis
Copy link

Fixes #106

This PR adds support for HTTPRedirection responses from servers that use CDNs, like Github private package repositories

The tests could be a lot cleaner if we were to use a library or framework to mock the HTTP requests and responses instead of running our own fake server.

When a source is redirected, Bundix::Fetcher will follow the redirection
and use the new URL as the source URL. This is useful for sources that
are hosted on GitHub, as GitHub will redirect to a CDN.

Fixes nix-community#106
These tests cover the case where the Fetcher is redirected to a new
location. The with_server method was re-written to allow for multiple
requests and responses.
@robbevp
Copy link

robbevp commented Jul 27, 2023

Just bumped into this issue as well. It would be great to get this moved forward

@robsears
Copy link

robsears commented Oct 9, 2023

@manveru Any chance this could get a review and merge? Running into the issue as well.

@Mic92
Copy link
Member

Mic92 commented Nov 8, 2023

Code looks good to me and even has tests for the fixed issue. I would go ahead and merge this in a bit if there are no objections.

@marsam marsam merged commit 1b7df69 into nix-community:master Nov 8, 2023
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.

HTTP Redirects fail
5 participants