You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
尾斜杠并跟随——命中该类网关的桶根列出恢复正常;其余重定向(同源跳转、区域
跳转等)保持 Go 默认行为(含 10 次上限),不受影响
新增两个单测:quirk 场景改写验证 + 普通同源跳转不受影响的回归
v0.2.4 — fix 404 listing on a class of path-forwarded gateway roots
Scenario
Some path-forwarded / reverse-proxied S3 sites only answer bucket listings
when the bucket root carries a trailing slash. A client sending the
conventional slash-less root (/bucket) is 301'd to an internal port (a web
app that does not serve the S3 API), and following the redirect yields 404.
Browsers never hit this because users open the slashed URL.
Fix
The s3x client now uses slashPreservingRedirect: when a 3xx merely
appends a trailing slash but also rewrites host/port/scheme (internal-port
redirect), the target is rewritten back to the original origin with the
slash appended — bucket-root listings on such gateways work again. All
other redirects (same-origin, regional, ...) keep Go's default policy
including the 10-redirect cap
Two new unit tests: the quirk rewrite + a same-origin regression case