1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/api/server/httputils
Stephen J Day ce22bc39dc api/server/httputils: service unavailable for disable swarm
When swarm-mode is disabled, we need to return an error indicating this.
406 was chosen for the "Not Acceptable" verbiage, but this code has
specific semantics in relation to the `Accept` header, which aren't
applicable here.

We now use a 503 for this case. While it is not a perfect match, it does
make it clear that the particular "service" (read: API endpoint) is not
available. The body of the message provides the user with enough
information to take action on it by enabling swarm-mode and ensuring the
service is available.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
(cherry picked from commit 1d90d76048)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 13:44:36 -08:00
..
decoder.go Add engine-api types to docker 2016-09-07 11:05:58 -07:00
errors.go api/server/httputils: service unavailable for disable swarm 2016-11-18 13:44:36 -08:00
form.go Remove defensive check of mux vars handling. 2015-10-14 10:31:09 -07:00
form_test.go Resolves #16458 - filter events by labels. 2015-10-02 16:33:20 -04:00
httputils.go api/server/httputils: compile with go < 1.7 2016-10-04 12:01:49 +02:00
httputils_write_json.go api/server/httputils: compile with go < 1.7 2016-10-04 12:01:49 +02:00
httputils_write_json_go16.go api/server/httputils: compile with go < 1.7 2016-10-04 12:01:49 +02:00