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

go proxy repos return remote 410 response as 404 to client

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Parked
    • Affects Version/s: 3.26.1
    • Fix Version/s: None
    • Component/s: golang
    • Labels:

      Description

      Create a go proxy repo to https://proxy.golang.org

      When a request is sent which gets a 410 from the remote, NXRM responds with 404 to the client instead.

      2020-08-19 14:33:46,898-0300 DEBUG [qtp1233048027-230] *UNKNOWN org.sonatype.nexus.httpclient.outbound - https://proxy.golang.org/github.com/antchfx/xpathclear/@v/list > GET /github.com/antchfx/xpathclear/@v/list HTTP/1.1
      2020-08-19 14:33:48,435-0300 DEBUG [qtp1233048027-230] *UNKNOWN org.sonatype.nexus.httpclient.outbound - https://proxy.golang.org/github.com/antchfx/xpathclear/@v/list < HTTP/1.1 410 Gone @ 1.537 s
      
      127.0.0.1 - - [19/Aug/2020:14:33:48 -0300] "GET /repository/golang-proxy/github.com/antchfx/xpathclear/@v/list HTTP/1.1" 404 - 1894 1545 "curl/7.68.0" [qtp1233048027-230]
      

      The 410 status code has a distinct use case in go proxies, so it is important to mimic what the official repository does.

      As the docs state, surfacing 410 to the client has a use case:

      When resolving a package path to its containing module, the go command will try all candidate module paths on each proxy in the list in succession. An unreachable proxy or HTTP status code other than 404 or 410 terminates the search without consulting the remaining proxies.

      Expected

      Return 410 status code from NXRM when the remote returns 410 status code.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            plynch Peter Lynch
            Last Updated By:
            Peter Lynch Peter Lynch
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                tigCommentSecurity.panel-title