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

gateway: don't redirect to trailing slash if it's go get #3963

Merged
merged 1 commit into from
Jun 9, 2017

Commits on Jun 8, 2017

  1. gateway: don't redirect to trailing slash if it's go get

    This enables `go get` to parse go-import meta tags from index.html
    files stored in IPFS. One tiny step toward whyrusleeping/gx-go#2.
    
    For an import like `ipfs.io/ipfs/QmFoo/mypkg`, the gateway would
    previously redirect to `/ipfs/QmFoo/mypkg/` (note the trailing slash),
    which the `go get` tool can't deal with.
    
    Thankfully, `go get` sets a URL query parameter (`?go-get=1`) which
    we can use to switch off the redirect in this case.
    
    License: MIT
    Signed-off-by: Lars Gierth <larsg@systemli.org>
    Lars Gierth committed Jun 8, 2017
    Configuration menu
    Copy the full SHA
    4fe5b3e View commit details
    Browse the repository at this point in the history