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

docker: valid Accept header #3352

Merged
merged 1 commit into from
Mar 25, 2021
Merged

docker: valid Accept header #3352

merged 1 commit into from
Mar 25, 2021

Conversation

thepwagner
Copy link
Contributor

Remove an errant " included in a string array constant used to derive the Accept headers for querying docker registries. Oh Ruby.

irb(main):001:0] %w(
irb(main):002:0]           application/vnd.docker.distribution.manifest.v2+json
irb(main):003:0]           application/vnd.docker.distribution.manifest.list.v2+json
irb(main):004:0]           application/json"
irb(main):005:0]         ).join(",")
=> "application/vnd.docker.distribution.manifest.v2+json,application/vnd.docker.distribution.manifest.list.v2+json,application/json\""

Many registries don't mind, but this manifests as a 400 response from Artifactory Pro:

[dependabot-core-dev] ~/dependabot-core $ curl -H'Accept: application/vnd.docker.distribution.manifest.v2+json, application/vnd.docker.distribution.manifest.list.v2+json, application/json"' https://2b0c7819212f.ngrok.io:443/v2/test-docker/alpine/tags/list
{
  "errors" : [ {
    "status" : 400,
    "message" : "Bad Request"
  } ]
}[dependabot-core-dev] ~/dependabot-core $ curl -H'Accept: application/vnd.docker.distribution.manifest.v2+json, application/vnd.docker.distribution.manifest.list.v2+json, application/json' https://2b0c7819212f.ngrok.io:443/v2/test-docker/alpine/tags/list
{
  "name" : "alpine",
  "tags" : [ "3.11.0", "3.12.0" ]
}[dependabot-core-dev] ~/dependabot-core $

Related

@thepwagner thepwagner requested a review from a team as a code owner March 25, 2021 14:06
@thepwagner thepwagner self-assigned this Mar 25, 2021
Copy link
Contributor

@feelepxyz feelepxyz left a comment

Choose a reason for hiding this comment

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

🙈

@thepwagner thepwagner merged commit 5b88eac into main Mar 25, 2021
@thepwagner thepwagner deleted the docker-stranded-quote branch March 25, 2021 15:27
@thepwagner thepwagner mentioned this pull request Mar 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants