-
Notifications
You must be signed in to change notification settings - Fork 100
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
fix: handle _redirects for If-None-Match headers #412
Conversation
Codecov Report
@@ Coverage Diff @@
## main #412 +/- ##
==========================================
+ Coverage 49.62% 49.76% +0.13%
==========================================
Files 248 248
Lines 29912 29933 +21
==========================================
+ Hits 14843 14895 +52
+ Misses 13640 13610 -30
+ Partials 1429 1428 -1
|
@lidel HEAD requests currently skip _redirects, I forget some of our prior conversation on if they should respect them as well. |
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.
@aschmahmann according to HTTP specs the behavior for HEAD should be the same as GET,
but it has such niche utility, that we said it is ok to skip the _redirect
logic for HEAD if it is too much work in MVP (#176).
iiuc next steps here:
- see if we can make HEAD the same as GET while we are at it
- add regression test described in Add test for _redirects with If-None-Match headers gateway-conformance#111
2023-07-20 conversation: this will make it in Kubo 0.22. We're not planning to do a Kubo 0.21 patch release currently with this. This was reported by Fleek. @aschmahmann will create an issue for this and notify #ipfs-operators in case anyone wants to block the header for the time being. |
97c8667
to
267b14f
Compare
…bipfs into fix/gateway-redirects-non-get
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.
LGTM, added a test. Pinging @lidel for a second look at the test.
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.
lgtm, thank you!
* fix: handle _redirects for If-None-Match headers * fix: handle _redirects for If-None-Match headers * fix(gateway): HEAD requests now respect _redirects * feat: add _redirects regression test * docs: add changelog entry (cherry picked from commit 1f5df74)
Fixes a bug where
If-None-Match
requests would return 404s when _redirects files should've been used.