Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-18497

Chef repository URL returns 200 when it should return 404

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 6.7.2
    • Fix Version/s: 6.12.0
    • Component/s: Chef
    • Labels:

      Description

      When accessing a certain URL after the /versions/ folder, an Artifactory chef repository behaves differently than the public chef repo:

      {{curl  -I https://supermarket.chef.io/api/v1/cookbooks/apache/versions/nonexist
      HTTP/1.1 404 Not Found}}

      {{curl -I http://artifactory:8081/artifactory/api/chef/chef-virtual/api/v1/cookbooks/apache/versions/nonexist
      HTTP/1.1 200 OK}}

      This makes it difficult to use as an existance decision in a chef cookbook:

      $ knife supermarket show bob notexist --format json && echo 'exists' || echo 'notexist'

      *****chef configs*****

      /Users/someuser/chef_something/chef.something.good.com1/.chef/knife.rb

      https://chef.something.good.com1/organizations/aaaa/

      ************

      ""

      exists

      Request is that 404 are returned as expected.

        Attachments

          Activity

            People

            Assignee:
            alexeiv Alexei Vainshtein
            Reporter:
            aaronr Aaron Rhodes
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: