Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-13915

conditional GET to npm group repository returns status 404 instead of 304 or 200

Details

    • Bug
    • Resolution: Fixed
    • Blocker
    • 3.6.0
    • 3.3.1, 3.5.0
    • NPM, Transport
    • 2

    Description

      When a Nexus 3 instance proxy's a repository it sends conditional GET requests for npm metadata to the remote.  These fail if the remote is a group repository in another Nexus 3 instance.

      Reproduce case:

      1. Configure an npm proxy repository to https:registry.npmjs.org in Nexus 3.5.0
      2. Create an npm group repository, add the proxy repo into it as a member
      3. Request npm metadata through the group, such as http://localhost:8081/repository/npm-group/ansi-regex
      4. Now request it again with a conditional GET - That will return a 404 response:
        $ curl -v -H "If-Modified-Since: Fri, 04 Aug 2017 16:45:35 GMT" http://localhost:8081/repository/npm-group/ansi-regex
        

      Expected

      Nexus should return 304 (not modified) IF
      the combined/merged metadata for all group repository members is no different ( not updated ) as compared to the conditional get conditions as applied by general standards.

      https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.25 OBSOLETE
      https://tools.ietf.org/html/rfc7232 - CURRENT conditional gets
      https://tools.ietf.org/html/rfc7230#section-3.2 - message headers general

      Note: Sending the same conditional GET directly to the remote proxy returns 304.

      Outcome

      Group repo requests will return 200 status + the most recent package metadata content instead of 404 now.
      Proper 304 response to conditional gets is a desired future improvement.

      Attachments

        Issue Links

          Activity

            People

              jtom Joe Tom
              rseddon Rich Seddon
              Peter Lynch Peter Lynch
              Nexus - Formats
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                tigCommentSecurity.panel-title