Skip to content

Commit 68ae016

Browse files
author
Ben Stahl
committed
All DataStore.getOffset methods should return a upload_length
1 parent ee426f9 commit 68ae016

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/stores/DataStore.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class DataStore {
7878
if (!id) {
7979
return reject(404);
8080
}
81-
return resolve({ size: 0 });
81+
return resolve({ size: 0, upload_length: 1 });
8282
});
8383
}
8484
}

test/Test-HeadHandler.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ describe('HeadHandler', () => {
4444
req.url = `${path}/1234`;
4545
handler.send(req, res)
4646
.then(() => {
47-
assert.equal(hasHeader(res, { 'Upload-Length': 0 }), true);
47+
assert.equal(hasHeader(res, { 'Upload-Offset': 0 }), true);
48+
assert.equal(hasHeader(res, { 'Upload-Length': 1 }), true);
4849
assert.equal(res.statusCode, 200);
4950
return;
5051
})

0 commit comments

Comments
 (0)