docker-archive / classicswarm

Swarm Classic: a container clustering system. Not to be confused with Docker Swarm which is at https://github.com/docker/swarmkit
Apache License 2.0
5.75k stars 1.08k forks source link

API /networks/{network_id}/connect sometimes return 404 page not found #2815

Closed panli889 closed 4 years ago

panli889 commented 6 years ago

I created a very simple network named r, and when I called swarm network connect API, it always return 404 page not found, however when I called the docker API, it's OK.

After I turn on the debug message, I found the API /networks/{network_id}/connect have become netwo{network.ID}ks/r/connect, so it turns to be 404 page not found.

I checked the related code and found this:

// Set the network ID in the proxied URL path.
r.URL.Path = strings.Replace(r.URL.Path, networkid, network.ID, 1)

The docker remote network API called with network name, so I think it's OK to remove this code?