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

Artifactory is not returning Cache-Control header for -SNAPSHOT/sha1/.jar artifacts

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 5.5.1
    • Fix Version/s: 6.4.0
    • Component/s: None
    • Labels:
      None
    • Sprint:
      Leap 34

      Description

      This appears to be a regression for RTFACT-6983
      Here is the expected response with maven-metadata.xml file (includes Cache-Control header and value):

      curl -vvv -X GET http://localhost:8080/artifactory/libs-snapshot-local/org/jfrog/test/multi/3.8-SNAPSHOT/maven-metadata.xml -uadmin:password
      Note: Unnecessary use of -X or --request, GET is already inferred.

      • Trying ::1...
      • TCP_NODELAY set
      • Connected to localhost (::1) port 8080 (#0)
      • Server auth using Basic with user 'admin'
        > GET /artifactory/libs-snapshot-local/org/jfrog/test/multi/3.8-SNAPSHOT/maven-metadata.xml HTTP/1.1
        > Host: localhost:8080
        > Authorization: Basic YWRtaW46cGFzc3dvcmQ=
        > User-Agent: curl/7.52.1
        > Accept: /
        >
        < HTTP/1.1 200 OK
        < Server: Artifactory/development
        < X-Artifactory-Id: 6899d0e9806c9547:-670f853d:15eb8db23c8:-8000
        < Last-Modified: Tue, 08 Aug 2017 08:24:46 GMT
        < ETag: 858f1bec094673de359d0cc5bb0ccb1d97a67fef
        < X-Checksum-Sha1: 858f1bec094673de359d0cc5bb0ccb1d97a67fef
        < X-Checksum-Sha256: 58301909fe9f059d5f2a506e0a9fa19dc93c8a7b14541d2314212d6b73c279b4
        < X-Checksum-Md5: 3da61b98df8ad3dccadcb92fb6b98594
        < Accept-Ranges: bytes
        < X-Artifactory-Filename: maven-metadata.xml
        < Content-Disposition: attachment; filename="maven-metadata.xml"; filename*=UTF-8''maven-metadata.xml
        < Cache-Control: no-store
        < Content-Type: application/xml
        < Content-Length: 594
        < Date: Wed, 27 Sep 2017 09:15:27 GMT

      Here is the response without Cache-Control header (for '-SNAPSHOT' suffix)
      curl -vvv -X GET http://localhost:8080/artifactory/libs-snapshot-local/org/jfrog/test/multi/3.8-SNAPSHOT/multi-3.8-20170222.201153-11.pom -uadmin:password
      Note: Unnecessary use of -X or --request, GET is already inferred.

      • Trying ::1...
      • TCP_NODELAY set
      • Connected to localhost (::1) port 8080 (#0)
      • Server auth using Basic with user 'admin'
        > GET /artifactory/libs-snapshot-local/org/jfrog/test/multi/3.8-SNAPSHOT/multi-3.8-20170222.201153-11.pom HTTP/1.1
        > Host: localhost:8080
        > Authorization: Basic YWRtaW46cGFzc3dvcmQ=
        > User-Agent: curl/7.52.1
        > Accept: /
        >
        < HTTP/1.1 200 OK
        < Server: Artifactory/development
        < X-Artifactory-Id: 6899d0e9806c9547:-670f853d:15eb8db23c8:-8000
        < Last-Modified: Wed, 22 Feb 2017 20:12:00 GMT
        < ETag: a04bae375d04d0f904baa700a5d3bc74e210c35c
        < X-Checksum-Sha1: a04bae375d04d0f904baa700a5d3bc74e210c35c
        < X-Checksum-Sha256: 7b1b113be7f7867c7d892753875e1d5ff1bcf67b75f475c1539ed3d064900933
        < X-Checksum-Md5: 8821159fe2109cce36a280570025a565
        < Accept-Ranges: bytes
        < X-Artifactory-Filename: multi-3.8-20170222.201153-11.pom
        < Content-Disposition: attachment; filename="multi-3.8-20170222.201153-11.pom"; filename*=UTF-8''multi-3.8-20170222.201153-11.pom
        < Content-Type: application/x-maven-pom+xml
        < Content-Length: 2721
        < Date: Wed, 27 Sep 2017 09:16:42 GMT

      Another response without Cache-Control header
      curl -vvv -X GET http://localhost:8080/artifactory/maven-local/com/google/guava/guava/18.0/guava-18.0.jar -uadmin:password
      Note: Unnecessary use of -X or --request, GET is already inferred.

      • Trying ::1...
      • TCP_NODELAY set
      • Connected to localhost (::1) port 8080 (#0)
      • Server auth using Basic with user 'admin'
        > GET /artifactory/maven-local/com/google/guava/guava/18.0/guava-18.0.jar HTTP/1.1
        > Host: localhost:8080
        > Authorization: Basic YWRtaW46cGFzc3dvcmQ=
        > User-Agent: curl/7.52.1
        > Accept: /
        >
        < HTTP/1.1 200 OK
        < Server: Artifactory/development
        < X-Artifactory-Id: 6899d0e9806c9547:-670f853d:15eb8db23c8:-8000
        < Last-Modified: Wed, 27 Sep 2017 08:45:35 GMT
        < ETag: cce0823396aa693798f8882e64213b1772032b09
        < X-Checksum-Sha1: cce0823396aa693798f8882e64213b1772032b09
        < X-Checksum-Sha256: d664fbfc03d2e5ce9cab2a44fb01f1d0bf9dfebeccc1a473b1f9ea31f79f6f99
        < X-Checksum-Md5: 947641f6bb535b1d942d1bc387c45290
        < Accept-Ranges: bytes
        < X-Artifactory-Filename: guava-18.0.jar
        < Content-Disposition: attachment; filename="guava-18.0.jar"; filename*=UTF-8''guava-18.0.jar
        < Content-Type: application/java-archive
        < Content-Length: 2256213
        < Date: Wed, 27 Sep 2017 09:11:33 GMT

        Attachments

          Activity

            People

            • Assignee:
              Dudim Dudi Morad
              Reporter:
              guyco Guy Cohen
            • Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: