ipfs / ipfs/boxo

pinning/http: Normalize trailing slash

Open
#382 0 comments 0 reactions 1 assignee Claimed by @lidel View on GitHub
help wanted kind/bug P2 status/ready
Dominant language
Go
Stars
316
Forks
163
Avg merge
4d 12h
Merged PRs (30d)
8

Description

If one uses endpoint that ends with `/`

```console
ipfs pin remote service ls --stat
mock http://127.0.0.1:5000/ 0/0/0/0
```

Some commands are sent with duplicate slash.
For example, checking pin status for MFS autopinning in go-ipfs 0.8.0 looks like this:

```
Request: GET //pins?limit=10&name=policy%2F12D3KooWQi9TnZaKyqU2T9Ho15by8LyEZMxsmWdLKufMy9ppMrnR%2Fmfs&status=queued%2Cpinning%2Cpinned%2Cfailed at Fri Apr 23 2021 18:18:50 GMT+0200, IP: ::ffff:127.0.0.1, User Agent: go-pinning-service-http-client
Response: 404 0.358 ms
```

I believe this type of thing should be fixed in this lib, because it is responsible for adding `/pins` command to the endpoint passed from userland.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.