From 6c24bd1074d0df2f6c73eeee4e67caea1d35c2f9 Mon Sep 17 00:00:00 2001 From: Chris Thoburn Date: Wed, 23 Nov 2022 23:32:46 -0800 Subject: [PATCH] fix content-length check --- .github/actions/setup/action.yml | 1 - .../tests/integration/response-currying-test.ts | 12 ++++-------- tests/request/tests/integration/response-test.ts | 3 +-- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 9f20fa4cb16..aa0189769e4 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -89,4 +89,3 @@ runs: lint-${{ github.head_ref }} lint-master lint- - diff --git a/tests/request/tests/integration/response-currying-test.ts b/tests/request/tests/integration/response-currying-test.ts index 96aaabefe9f..d994c54349e 100644 --- a/tests/request/tests/integration/response-currying-test.ts +++ b/tests/request/tests/integration/response-currying-test.ts @@ -27,7 +27,7 @@ module('RequestManager | Response Currying', function () { // @ts-expect-error serialized.headers = (serialized.headers as [string, string][]).filter((v) => { // don't test headers that change every time - return !['date', 'etag', 'last-modified'].includes(v[0]); + return !['content-length', 'date', 'etag', 'last-modified'].includes(v[0]); }); // @ts-expect-error port is unstable in CI delete serialized.url; @@ -40,7 +40,6 @@ module('RequestManager | Response Currying', function () { headers: [ ['accept-ranges', 'bytes'], ['cache-control', 'public, max-age=0'], - ['content-length', '57'], ['content-type', 'application/json; charset=UTF-8'], // ['date', 'Wed, 23 Nov 2022 05:17:11 GMT'], // ['etag', 'W/"39-1849db13af9"'], @@ -100,7 +99,7 @@ module('RequestManager | Response Currying', function () { // @ts-expect-error serialized.headers = (serialized.headers as [string, string][]).filter((v) => { // don't test headers that change every time - return !['date', 'etag', 'last-modified'].includes(v[0]); + return !['content-length', 'date', 'etag', 'last-modified'].includes(v[0]); }); // @ts-expect-error port is unstable in CI delete serialized.url; @@ -113,7 +112,6 @@ module('RequestManager | Response Currying', function () { headers: [ ['accept-ranges', 'bytes'], ['cache-control', 'public, max-age=0'], - ['content-length', '57'], ['content-type', 'application/json; charset=UTF-8'], // ['date', 'Wed, 23 Nov 2022 05:17:11 GMT'], // ['etag', 'W/"39-1849db13af9"'], @@ -155,7 +153,7 @@ module('RequestManager | Response Currying', function () { // @ts-expect-error serialized.headers = (serialized.headers as [string, string][]).filter((v) => { // don't test headers that change every time - return !['date', 'etag', 'last-modified'].includes(v[0]); + return !['content-length', 'date', 'etag', 'last-modified'].includes(v[0]); }); // @ts-expect-error port is unstable in CI delete serialized.url; @@ -168,7 +166,6 @@ module('RequestManager | Response Currying', function () { headers: [ ['accept-ranges', 'bytes'], ['cache-control', 'public, max-age=0'], - ['content-length', '57'], ['content-type', 'application/json; charset=UTF-8'], // ['date', 'Wed, 23 Nov 2022 05:17:11 GMT'], // ['etag', 'W/"39-1849db13af9"'], @@ -223,7 +220,7 @@ module('RequestManager | Response Currying', function () { // @ts-expect-error serialized.headers = (serialized.headers as [string, string][]).filter((v) => { // don't test headers that change every time - return !['date', 'etag', 'last-modified'].includes(v[0]); + return !['content-length', 'date', 'etag', 'last-modified'].includes(v[0]); }); // @ts-expect-error port is unstable in CI delete serialized.url; @@ -236,7 +233,6 @@ module('RequestManager | Response Currying', function () { headers: [ ['accept-ranges', 'bytes'], ['cache-control', 'public, max-age=0'], - ['content-length', '57'], ['content-type', 'application/json; charset=UTF-8'], // ['date', 'Wed, 23 Nov 2022 05:17:11 GMT'], // ['etag', 'W/"39-1849db13af9"'], diff --git a/tests/request/tests/integration/response-test.ts b/tests/request/tests/integration/response-test.ts index a37731d5392..dbe8af9a7ba 100644 --- a/tests/request/tests/integration/response-test.ts +++ b/tests/request/tests/integration/response-test.ts @@ -21,7 +21,7 @@ module('RequestManager | Response', function () { // @ts-expect-error serialized.headers = (serialized.headers as [string, string][]).filter((v) => { // don't test headers that change every time - return !['date', 'etag', 'last-modified'].includes(v[0]); + return !['content-length', 'date', 'etag', 'last-modified'].includes(v[0]); }); // @ts-expect-error port is unstable in CI delete serialized.url; @@ -34,7 +34,6 @@ module('RequestManager | Response', function () { headers: [ ['accept-ranges', 'bytes'], ['cache-control', 'public, max-age=0'], - ['content-length', '57'], ['content-type', 'application/json; charset=UTF-8'], // ['date', 'Wed, 23 Nov 2022 05:17:11 GMT'], // ['etag', 'W/"39-1849db13af9"'],