Skip to content

swarm: fix API version detection#40816

Merged
tiborvass merged 1 commit intomoby:masterfrom
thaJeztah:fix_api_version_handling
Apr 15, 2020
Merged

swarm: fix API version detection#40816
tiborvass merged 1 commit intomoby:masterfrom
thaJeztah:fix_api_version_handling

Conversation

@thaJeztah
Copy link
Member

I noticed this while testing some variations of API versions in #39882, but using cURL instead of the docker cli or docker client.

While the docker cli may be sending a "version" header, this header is not part of the API, or at least should not determin what API version is used.

This code was added in c0afd9c (#32388), to adjust the handling of requests when an older version of the API was used, but because the code relied on the "version" header set by the CLI, it didn't work with other clients (e.g. when using cURL to make an API request).

- Description for the changelog

While the docker cli may be sending a "version" header, this header
is not part of the API, or at least should not determin what API
version is used.

This code was added in c0afd9c, to
adjust the handling of requests when an older version of the API was
used, but because the code relied on the "version" header set by the
CLI, it didn't work with other clients (e.g. when using cURL to make
an API request).

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah
Copy link
Member Author

@cpuguy83 @kolyshkin @tiborvass PTAL

Copy link
Member

@cpuguy83 cpuguy83 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tiborvass tiborvass merged commit f4b0673 into moby:master Apr 15, 2020
@thaJeztah thaJeztah deleted the fix_api_version_handling branch April 15, 2020 20:19
@thaJeztah thaJeztah added this to the 20.03.0 milestone Apr 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants