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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.3.1, 3.5.0
    • Fix Version/s: 3.6.0
    • Component/s: NPM, Transport
    • Labels:
    • Story Points:
      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

              Assignee:
              jtom Joe Tom
              Reporter:
              rseddon Rich Seddon
              Last Updated By:
              Peter Lynch
              Team:
              Nexus - Formats
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response:

                  tigCommentSecurity.panel-title