fix(gateway)!: no duplicate payload during subdomain redirects#326
Merged
fix(gateway)!: no duplicate payload during subdomain redirects#326
Conversation
This comment was marked as off-topic.
This comment was marked as off-topic.
Member
|
@hacdias Yes, this is expected -- these tests are there to ensure we don't change this silently until we are ready. I think we are ready, we should stop doing this and remove it from conformance, don't want others to reimplement this hack.
|
0a177e9 to
7cd8aee
Compare
This was referenced Jun 1, 2023
Member
Author
|
lidel
approved these changes
Jun 1, 2023
Member
lidel
left a comment
There was a problem hiding this comment.
Lgtm, thank you for cleaning this up! ❤️
I'm merging and bubbling up to ipfs/kubo#9913
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is based on top of #315 since that PR also has to deal with this.
Right now we send the content body on requests that include redirection. This decision was made a long time ago to ensure that tools, such as
curlandwgetwould be able to fetch onlocalhostand not be redirected to subdomains that may not work with them. However, considering the published gateway standards we have, this may be a legacy thing we can clean up.Unfortunately, we have sharness and conformance tests that check for the body on redirection requests. Those will need to be updated in order for this to work.
cc @lidel