oras-project / oras-py

ORAS Python SDK
https://oras-project.github.io/oras-py/
Apache License 2.0
40 stars 36 forks source link

Add option to refresh (current behaviour) or keep previous headers when fetching manifests #123

Closed kavish-p closed 10 months ago

kavish-p commented 10 months ago

Related PR: #121

A new optional parameter refresh_headers has been added to the pull and get_manifest functions. When no value is provided, refresh_headers is set to True. This in in line with the current behaviour.

Setting refresh_headers to False carries forward previously set headers to the get_manifest call.

kavish-p commented 10 months ago

hi @vsoch , sorry, I messed up my local repository so I thought it would be easier to create a new PR.

Regarding your comment from https://github.com/oras-project/oras-py/pull/121#issuecomment-1913905195: When refresh_headers is not defined (None), I believe the default value should be True. Then previously set headers are ignored, which is the current behaviour.