typo; add content length header
This commit is contained in:
parent
ac5141c79a
commit
efaa2aa24d
3
dist/index.js
vendored
3
dist/index.js
vendored
@ -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
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
3
index.js
3
index.js
@ -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');
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user