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

Pypi smart remote repo add trailing "/" to upstream metadata URL

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: 4 - Normal
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      When setting up a remote pypi repo on instance A proxying a remote pypi repo on instance B, when resolving metadata, the URL doesn't have a trailing slash at first, and is redirected to contain the trailing slash. For example, for the package Octoparse in http loggers:

      2019-01-29 22:58:24,145 [http-nio-8081-exec-1] [DEBUG] (o.a.h.headers       :135) - http-outgoing-28 >> HEAD /artifactory/api/pypi/pypi-remote/simple/octoparse HTTP/1.1

      ...

      2019-01-29 22:58:24,184 [http-nio-8081-exec-1] [DEBUG] (o.a.h.wire          :72) - http-outgoing-28 << "HTTP/1.1 302 Found[\r][\n]"

      ...

      2019-01-29 22:58:24,188 [http-nio-8081-exec-1] [DEBUG] (o.a.h.i.e.RedirectExec:159) - Redirecting to 'http://mill.jfrog.info:12344/artifactory/api/pypi/pypi-remote/simple/octoparse/' via {}->http://mill.jfrog.info:12344

      ...

      2019-01-29 22:58:24,189 [http-nio-8081-exec-1] [DEBUG] (o.a.h.headers       :135) - http-outgoing-28 >> HEAD /artifactory/api/pypi/pypi-remote/simple/octoparse/ HTTP/1.1

       

      It would be nice if the initial request could contain the trailing "/", so a redirect would not be needed:

      2019-01-29 22:58:24,189 [http-nio-8081-exec-1] [DEBUG] (o.a.h.headers       :135) - http-outgoing-28 >> HEAD /artifactory/api/pypi/pypi-remote/simple/octoparse/ HTTP/1.1

       

      Steps to reproduce:

      -set up remote pypi repo proxying pypi.org on instance A

      -on instance B, set up remote pypi repo proxying instance A, with both URL and registry URL with path:

      api/pypi/pypi-remote/simple/octoparse/

      -on instance B, set up http debug loggers and see that Artifactory reaches out to instance A without the trailing slash first, and is redirected with a 302 Found to include the trailing slash.

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              mattheww Matthew Wang
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated: