Skip to content

Commit 4b7c9f0

Browse files
authored
fix: upload_manifest request by removing Content-Length header (#190)
the upload_manifest function incorrectly set the Content-Length header field which is not mentioned by the distribution specification Signed-off-by: Robin Bergewski <robinbergewski@gmail.com>
2 parents 9779068 + eaff7da commit 4b7c9f0

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ and **Merged pull requests**. Critical items to know are:
1414
The versions coincide with releases on pip. Only major versions will be released as tags on Github.
1515

1616
## [0.0.x](https://github.com/oras-project/oras-py/tree/main) (0.0.x)
17+
- don't include Content-Length header in upload_manifest (0.2.29)
1718
- propagate the tls_verify parameter to auth backends (0.2.28)
1819
- don't add an Authorization header is there is no token (0.2.27), closes issue [182](https://github.com/oras-project/oras-py/issues/182)
1920
- check for blob existence before uploading (0.2.26)

oras/provider.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,6 @@ def upload_manifest(
704704
jsonschema.validate(manifest, schema=oras.schemas.manifest)
705705
headers = {
706706
"Content-Type": oras.defaults.default_manifest_media_type,
707-
"Content-Length": str(len(manifest)),
708707
}
709708
return self.do_request(
710709
f"{self.prefix}://{container.manifest_url()}", # noqa

oras/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
__copyright__ = "Copyright The ORAS Authors."
33
__license__ = "Apache-2.0"
44

5-
__version__ = "0.2.28"
5+
__version__ = "0.2.29"
66
AUTHOR = "Vanessa Sochat"
77
EMAIL = "vsoch@users.noreply.github.com"
88
NAME = "oras"

0 commit comments

Comments
 (0)