Details
-
Bug
-
Resolution: Fixed
-
Major
-
2.14.12
-
2
Description
Conditional GET requests made to "repodata/repomd.xml" files in a Nexus Repo 2.x yum enabled hosted repository always return 304 unmodified.
This breaks proxying of these repositories from Nexus Repo 3.x.
Reproduce case:
- Enable yum metadata creation on a snapshot maven repository in 2.14.12
- Deploy an rpm into it
- Configure a yum proxy repository in Nexus Repo 3, set the remote to the snapshot repository in Nexus Repo 2
- Retreive 'repodata/repomd.xml" through the proxy
- Deploy a new snapshot rpm into Nexus Repo 2
- Verify that yum metadata was regenerated
- Invalidate cache in the Repo 3 proxy
- Retreive 'repodata/repomd.xml" through the proxy
Observe that in the Nexus Repo 2 log a "304" unmodified response is sent for the repodata/repomd.xml file.
192.168.1.78 - - [13/Mar/2019:13:26:25 -0500] "GET /nexus/content/repositories/snapshots/repodata/repomd.xml HTTP/1.1" 304 0 3
Replaying the same request (with the same headers) through curl shows the same result.
curl -v -H "If-Modified-Since: Wed, 13 Mar 2019 18:13:08 GMT" -H 'If-None-Match: "\{SHA1\{3fb868897104aa608240d2a1c74822cc95155755}}"' http://192.168.1.102:8081/nexus/content/repositories/snapshots/repodata/repomd.xml * Trying 192.168.1.102... * TCP_NODELAY set * Connected to 192.168.1.102 (192.168.1.102) port 8081 (#0) > GET /nexus/content/repositories/snapshots/repodata/repomd.xml HTTP/1.1 > Host: 192.168.1.102:8081 > User-Agent: curl/7.54.0 > Accept: */* > If-Modified-Since: Wed, 13 Mar 2019 18:13:08 GMT > If-None-Match: "\{SHA1\{3fb868897104aa608240d2a1c74822cc95155755}}" > < HTTP/1.1 304 Not Modified < Date: Wed, 13 Mar 2019 18:27:09 GMT < Server: Nexus/2.14.7-01 < X-Frame-Options: SAMEORIGIN < X-Content-Type-Options: nosniff < Accept-Ranges: bytes < ETag: "\{SHA1\{3fb868897104aa608240d2a1c74822cc95155755}}" < * Connection #0 to host 192.168.1.102 left intact
But that file has been modified. I'm in GMT-5, btw.
$ pwd /home/rseddon/bar/nexus/sonatype-work/nexus/storage/snapshots/repodata $ ls -l total 16 -rw-r--r-- 1 rseddon rseddon 1248 Mar 13 13:25 3436a28862b8bf7064db9e1403d7ebeaa7d0ae84b04a8100a169d870a24df2ee-primary.xml.gz -rw-r--r-- 1 rseddon rseddon 560 Mar 13 13:25 5fe0c4457cb386be344a5bf6db6aab041ec83eec67c8116c6962e88485eaa43f-other.xml.gz -rw-r--r-- 1 rseddon rseddon 836 Mar 13 13:25 dd555431f51dd26c2782835de1e60930e30822a68eefc303d8ac334ac033940f-filelists.xml.gz -rw-r--r-- 1 rseddon rseddon 1500 Mar 13 13:25 repomd.xml
Attachments
Issue Links
- is related to
-
NEXUS-15815 Yum Proxy implement Condition GET
-
- Closed
-