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

PyPI repository claims to support Range requests but ignores header?

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: 4 - Normal
    • Resolution: Unresolved
    • Affects Version/s: 6.18.1
    • Fix Version/s: None
    • Component/s: PyPI
    • Labels:
      None
    • Severity:
      Medium

      Description

      I came across this issue while testing part of a forthcoming pip release.  An experimental version of pip uses HTTP Range requests to incrementally fetch wheels, so that it can stop the transfer once any dependency information is downloaded.  This doesn't work on artifactory - pip crashes when trying to use it.  I reported the issue here on pip's tracker.  After some command line testing with cURL, I think the problem may well be in Artifactory.

      $ curl -H "Range: bytes=0-1023"  "http://artifactory.example.com/artifactory/api/pypi/python-virtual-repo/packages/packages/6b/36/d6c18632a339dafa54fd128b0dd2c36c6dc4bc86b8e0d366ccd9f22b480a/Cython-0.29.21-cp37-cp37m-manylinux1_x86_64.whl" -i  -v -s > /dev/null
      * About to connect() to artifactory.example.com port 8081 (#0)
      *   Trying 130.14.25.172...
      * Connected to artifactory.example.com (130.14.25.172) port 8081 (#0)
      > GET /artifactory/api/pypi/python-virtual-repo/packages/packages/6b/36/d6c18632a339dafa54fd128b0dd2c36c6dc4bc86b8e0d366ccd9f22b480a/Cython-0.29.21-cp37-cp37m-manylinux1_x86_64.whl HTTP/1.1
      > User-Agent: curl/7.29.0
      > Host: artifactory.example.com
      > Accept: */*
      > Range: bytes=0-1023
      > 
      < HTTP/1.1 200 OK
      < Server: Artifactory/6.18.1
      < X-Artifactory-Id: 58b6d1fd8d039ec1:-18e585a9:17378973c9c:-8000
      < Cache-Control: public, max-age=31536000
      < Last-Modified: Wed, 08 Jul 2020 21:56:33 GMT
      < ETag: 5c7486cdb788792dfb0ea3928e075a2df9960578
      < X-Checksum-Sha1: 5c7486cdb788792dfb0ea3928e075a2df9960578
      < X-Checksum-Sha256: 5e545a48f919e40079b0efe7b0e081c74b96f9ef25b9c1ff4cdbd95764426b58
      < X-Checksum-Md5: e244967a4c60b39072d30485df45fd90
      < Accept-Ranges: bytes
      < X-Artifactory-Filename: Cython-0.29.21-cp37-cp37m-manylinux1_x86_64.whl
      < Content-Disposition: attachment; filename="Cython-0.29.21-cp37-cp37m-manylinux1_x86_64.whl"; filename*=UTF-8''Cython-0.29.21-cp37-cp37m-manylinux1_x86_64.whl
      < Content-Type: application/octet-stream
      < Content-Length: 1969113
      < Date: Fri, 14 Aug 2020 17:20:12 GMT
      < 
      { [data not shown]
      * Connection #0 to host artifactory.example.com left intact 

      I'm not an HTTP expert, but my understanding is that the content-length should be 1024 and the status should be 206, rather than 1969113 and 200.

      The pip feature that uses this is not yet enabled by default, but it may be this fall.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            tgs Thomas Smith
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Sync Status

                Connection: RTFACT Sync
                RTMID-23108 -
                SYNCHRONIZED
                • Last Sync Date: