typo; add content length header

This commit is contained in:
James Brumond 2023-08-18 22:49:59 -07:00
parent ac5141c79a
commit efaa2aa24d
Signed by: james
GPG Key ID: E8F2FC44BAA3357A
3 changed files with 5 additions and 3 deletions

3
dist/index.js vendored
View File

@ -2947,6 +2947,7 @@ async function put_manifest(new_tag, manifest, input) {
const path = `/v2/${input.manifest.image}/manifests/${new_tag}`;
const req_headers = {
'content-type': manifest_media_type,
'content-length': Buffer.byteLength(manifest),
};
http_basic_auth(req_headers, input);
@ -2958,7 +2959,7 @@ async function put_manifest(new_tag, manifest, input) {
const { status, headers, body } = await http_req('PUT', input.registry_url + path, req_headers, manifest);
if (status >= 400) {
console.error('get manifest response', { status, headers, body });
console.error('put manifest response', { status, headers, body });
throw new Error('failed to put manifest');
}
}

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -86,6 +86,7 @@ async function put_manifest(new_tag, manifest, input) {
const path = `/v2/${input.manifest.image}/manifests/${new_tag}`;
const req_headers = {
'content-type': manifest_media_type,
'content-length': Buffer.byteLength(manifest),
};
http_basic_auth(req_headers, input);
@ -97,7 +98,7 @@ async function put_manifest(new_tag, manifest, input) {
const { status, headers, body } = await http_req('PUT', input.registry_url + path, req_headers, manifest);
if (status >= 400) {
console.error('get manifest response', { status, headers, body });
console.error('put manifest response', { status, headers, body });
throw new Error('failed to put manifest');
}
}