Skip to content

Commit

Permalink
fix: remove upload-length from patch
Browse files Browse the repository at this point in the history
  • Loading branch information
gajus committed May 19, 2020
1 parent fdcb5c6 commit 051ad06
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
9 changes: 0 additions & 9 deletions test/express-tus/factories/createTusMiddleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ test('PATCH request with unsupported content-type produces 415', async (t) => {
headers: {
'content-type': 'application/json',
'tus-resumable': '1.0.0',
'upload-length': '100',
},
method: 'PATCH',
throwHttpErrors: false,
Expand All @@ -233,7 +232,6 @@ test('PATCH with an unexpected upload-offset produces 409 conflict', async (t) =
headers: {
'content-type': 'application/offset+octet-stream',
'tus-resumable': '1.0.0',
'upload-length': '100',
'upload-offset': '50',
},
method: 'PATCH',
Expand All @@ -256,7 +254,6 @@ test('produces 400 if PATCH request is made without upload-offset', async (t) =>
headers: {
'content-type': 'application/offset+octet-stream',
'tus-resumable': '1.0.0',
'upload-length': '100',
},
method: 'PATCH',
throwHttpErrors: false,
Expand All @@ -283,7 +280,6 @@ test('successful PATCH produces 204', async (t) => {
headers: {
'content-type': 'application/offset+octet-stream',
'tus-resumable': '1.0.0',
'upload-length': '100',
'upload-offset': '0',
},
method: 'PATCH',
Expand Down Expand Up @@ -451,7 +447,6 @@ test('PATCH describes upload-expires', async (t) => {
headers: {
'content-type': 'application/offset+octet-stream',
'tus-resumable': '1.0.0',
'upload-length': '100',
'upload-offset': '0',
},
method: 'PATCH',
Expand Down Expand Up @@ -502,7 +497,6 @@ test('validates checksum', async (t) => {
'content-type': 'application/offset+octet-stream',
'tus-resumable': '1.0.0',
'upload-checksum': 'sha1 Ys23Ag/5IOWqZCw9QGaVDdHwH00=',
'upload-length': '100',
'upload-offset': '0',
},
method: 'PATCH',
Expand All @@ -529,7 +523,6 @@ test('produces 400 error if checksum algorithm is not supported', async (t) => {
'content-type': 'application/offset+octet-stream',
'tus-resumable': '1.0.0',
'upload-checksum': 'sha512 Ys23Ag/5IOWqZCw9QGaVDdHwH00=',
'upload-length': '100',
'upload-offset': '0',
},
method: 'PATCH',
Expand Down Expand Up @@ -561,7 +554,6 @@ test('discards chunk if checksum does not match', async (t) => {
'content-type': 'application/offset+octet-stream',
'tus-resumable': '1.0.0',
'upload-checksum': 'sha1 Ys23Ag/5IOWqZCw9QGaVDdHwH00=',
'upload-length': '3',
'upload-offset': '0',
},
method: 'PATCH',
Expand All @@ -575,7 +567,6 @@ test('discards chunk if checksum does not match', async (t) => {
'content-type': 'application/offset+octet-stream',
'tus-resumable': '1.0.0',
'upload-checksum': 'sha1 Ys23Ag/5IOWqZCw9QGaVDdHwH00=',
'upload-length': '3',
'upload-offset': '3',
},
method: 'PATCH',
Expand Down
5 changes: 0 additions & 5 deletions test/express-tus/integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ test('uploads file', async (t) => {
headers: {
'content-type': 'application/offset+octet-stream',
'tus-resumable': '1.0.0',
'upload-length': '3',
'upload-offset': '0',
},
method: 'PATCH',
Expand Down Expand Up @@ -78,7 +77,6 @@ test('uploads file (multiple patch requests)', async (t) => {
headers: {
'content-type': 'application/offset+octet-stream',
'tus-resumable': '1.0.0',
'upload-length': '3',
'upload-offset': '0',
},
method: 'PATCH',
Expand All @@ -89,7 +87,6 @@ test('uploads file (multiple patch requests)', async (t) => {
headers: {
'content-type': 'application/offset+octet-stream',
'tus-resumable': '1.0.0',
'upload-length': '3',
'upload-offset': '3',
},
method: 'PATCH',
Expand Down Expand Up @@ -129,7 +126,6 @@ test('does not modify source (wrong offset)', async (t) => {
headers: {
'content-type': 'application/offset+octet-stream',
'tus-resumable': '1.0.0',
'upload-length': '3',
'upload-offset': '0',
},
method: 'PATCH',
Expand All @@ -142,7 +138,6 @@ test('does not modify source (wrong offset)', async (t) => {
headers: {
'content-type': 'application/offset+octet-stream',
'tus-resumable': '1.0.0',
'upload-length': '3',
'upload-offset': '1',
},
method: 'PATCH',
Expand Down

0 comments on commit 051ad06

Please sign in to comment.