Skip to content

Commit b82869f

Browse files
authored
Remove Content-Length header from nock responses (#3839)
1 parent 9a134d8 commit b82869f

43 files changed

Lines changed: 2 additions & 316 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/composites/circuit-breaker/test/integration/fixtures.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ export const mockDataProviderResponses = (): nock.Scope =>
4444
'Express',
4545
'Content-Type',
4646
'application/json; charset=utf-8',
47-
'Content-Length',
48-
'714',
4947
'ETag',
5048
'W/"4c-80HqZxTKkxT2QbzJJxLmlKoGX1c"',
5149
'Date',
@@ -73,8 +71,6 @@ nock(dataProviderConfig.coingecko.providerUrl)
7371
'Express',
7472
'Content-Type',
7573
'application/json; charset=utf-8',
76-
'Content-Length',
77-
'714',
7874
'ETag',
7975
'W/"4c-80HqZxTKkxT2QbzJJxLmlKoGX1c"',
8076
'Date',
@@ -91,8 +87,6 @@ nock(dataProviderConfig.coinpaprika.providerUrl)
9187
'Express',
9288
'Content-Type',
9389
'application/json; charset=utf-8',
94-
'Content-Length',
95-
'714',
9690
'ETag',
9791
'W/"4c-80HqZxTKkxT2QbzJJxLmlKoGX1c"',
9892
'Date',
@@ -108,8 +102,6 @@ nock(dataProviderConfig.wootrade.providerUrl)
108102
'Express',
109103
'Content-Type',
110104
'application/json; charset=utf-8',
111-
'Content-Length',
112-
'714',
113105
'ETag',
114106
'W/"4c-80HqZxTKkxT2QbzJJxLmlKoGX1c"',
115107
'Date',

packages/composites/crypto-volatility-index/test/integration/fixtures/index.ts

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ export function mockTokenAllocationResponseETH() {
3737
'Express',
3838
'Content-Type',
3939
'application/json; charset=utf-8',
40-
'Content-Length',
41-
'714',
4240
'ETag',
4341
'W/"2ca-B0TkX1zAQfIfnHwQo6e4kGAEMCs"',
4442
'Date',
@@ -84,8 +82,6 @@ export function mockTokenAllocationResponseBTC() {
8482
'Express',
8583
'Content-Type',
8684
'application/json; charset=utf-8',
87-
'Content-Length',
88-
'714',
8985
'ETag',
9086
'W/"2ca-B0TkX1zAQfIfnHwQo6e4kGAEMCs"',
9187
'Date',
@@ -117,8 +113,6 @@ export function mockCurrencyEndpointETH() {
117113
'Express',
118114
'Content-Type',
119115
'application/json; charset=utf-8',
120-
'Content-Length',
121-
'714',
122116
'ETag',
123117
'W/"2ca-B0TkX1zAQfIfnHwQo6e4kGAEMCs"',
124118
'Date',
@@ -150,8 +144,6 @@ export function mockCurrencyEndpointBTC() {
150144
'Express',
151145
'Content-Type',
152146
'application/json; charset=utf-8',
153-
'Content-Length',
154-
'714',
155147
'ETag',
156148
'W/"2ca-B0TkX1zAQfIfnHwQo6e4kGAEMCs"',
157149
'Date',
@@ -170,8 +162,6 @@ export function mockBookDataEndpointETH() {
170162
'Express',
171163
'Content-Type',
172164
'application/json; charset=utf-8',
173-
'Content-Length',
174-
'714',
175165
'ETag',
176166
'W/"2ca-B0TkX1zAQfIfnHwQo6e4kGAEMCs"',
177167
'Date',
@@ -189,8 +179,6 @@ export function mockBookDataEndpointBTC() {
189179
'Express',
190180
'Content-Type',
191181
'application/json; charset=utf-8',
192-
'Content-Length',
193-
'714',
194182
'ETag',
195183
'W/"2ca-B0TkX1zAQfIfnHwQo6e4kGAEMCs"',
196184
'Date',
@@ -208,8 +196,6 @@ export function mockInstrumentsETH() {
208196
'Express',
209197
'Content-Type',
210198
'application/json; charset=utf-8',
211-
'Content-Length',
212-
'714',
213199
'ETag',
214200
'W/"2ca-B0TkX1zAQfIfnHwQo6e4kGAEMCs"',
215201
'Date',
@@ -227,8 +213,6 @@ export function mockInstrumentsBTC() {
227213
'Express',
228214
'Content-Type',
229215
'application/json; charset=utf-8',
230-
'Content-Length',
231-
'714',
232216
'ETag',
233217
'W/"2ca-B0TkX1zAQfIfnHwQo6e4kGAEMCs"',
234218
'Date',

packages/composites/defi-dozen/test/integration/fixtures.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ export const mockDataProviderResponses = (): void => {
4242
'Express',
4343
'Content-Type',
4444
'application/json; charset=utf-8',
45-
'Content-Length',
46-
'714',
4745
'ETag',
4846
'W/"2ca-B0TkX1zAQfIfnHwQo6e4kGAEMCs"',
4947
'Date',

packages/composites/historical-average/test/integration/fixtures.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,6 @@ export const mockCoinmarketcapAdapter = (): nock.Scope =>
117117
[
118118
'Content-Type',
119119
'application/json; charset=utf-8',
120-
'Content-Length',
121-
'1570',
122120
'ETag',
123121
'W/"622-9erE3lcWoqAfMLTzKbOESASP4e0"',
124122
'Connection',

packages/composites/implied-price/test/integration/fixtures.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ export const mockSuccessfulResponseCoingecko = (): nock.Scope => {
1515
'1638250385',
1616
'Content-Type',
1717
'application/json; charset=utf-8',
18-
'Content-Length',
19-
'91',
2018
'ETag',
2119
'W/"5b-336W6SWFMKfGuh90hvQDQ8pBArM"',
2220
'Connection',
@@ -75,8 +73,6 @@ export const mockSuccessfulResponseCoinpaprika = (): nock.Scope =>
7573
'1638250383',
7674
'Content-Type',
7775
'application/json; charset=utf-8',
78-
'Content-Length',
79-
'107',
8076
'ETag',
8177
'W/"6b-lQYlgZnpNzhbNYmlxSm02Pk34qo"',
8278
'Connection',

packages/composites/medianizer/test/integration/fixtures.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ export const mockSuccessfulResponsesWithoutCommaSeparatedSources = () => {
3030
'1638250385',
3131
'Content-Type',
3232
'application/json; charset=utf-8',
33-
'Content-Length',
34-
'91',
3533
'ETag',
3634
'W/"5b-336W6SWFMKfGuh90hvQDQ8pBArM"',
3735
'Connection',
@@ -68,8 +66,6 @@ export const mockSuccessfulResponsesWithoutCommaSeparatedSources = () => {
6866
'1638250383',
6967
'Content-Type',
7068
'application/json; charset=utf-8',
71-
'Content-Length',
72-
'107',
7369
'ETag',
7470
'W/"6b-lQYlgZnpNzhbNYmlxSm02Pk34qo"',
7571
'Connection',
@@ -108,8 +104,6 @@ export const mockSuccessfulResponsesWithCommaSeparatedSources = () => {
108104
'1638250385',
109105
'Content-Type',
110106
'application/json; charset=utf-8',
111-
'Content-Length',
112-
'91',
113107
'ETag',
114108
'W/"5b-336W6SWFMKfGuh90hvQDQ8pBArM"',
115109
'Connection',
@@ -146,8 +140,6 @@ export const mockSuccessfulResponsesWithCommaSeparatedSources = () => {
146140
'1638250383',
147141
'Content-Type',
148142
'application/json; charset=utf-8',
149-
'Content-Length',
150-
'107',
151143
'ETag',
152144
'W/"6b-lQYlgZnpNzhbNYmlxSm02Pk34qo"',
153145
'Connection',
@@ -186,8 +178,6 @@ export const mockSuccessfulResponsesWithSingleSource = () => {
186178
'1638250385',
187179
'Content-Type',
188180
'application/json; charset=utf-8',
189-
'Content-Length',
190-
'91',
191181
'ETag',
192182
'W/"5b-336W6SWFMKfGuh90hvQDQ8pBArM"',
193183
'Connection',

packages/composites/nftx/test/integration/fixtures.ts

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ export function mockEthereumResponseSuccess(): void {
1818
'Tue, 22 Feb 2022 00:53:33 GMT',
1919
'Content-Type',
2020
'application/json',
21-
'Content-Length',
22-
'40',
2321
'Connection',
2422
'close',
2523
],
@@ -38,8 +36,6 @@ export function mockEthereumResponseSuccess(): void {
3836
'Tue, 22 Feb 2022 00:53:33 GMT',
3937
'Content-Type',
4038
'application/json',
41-
'Content-Length',
42-
'40',
4339
'Connection',
4440
'close',
4541
],
@@ -58,8 +54,6 @@ export function mockEthereumResponseSuccess(): void {
5854
'Tue, 22 Feb 2022 00:53:33 GMT',
5955
'Content-Type',
6056
'application/json',
61-
'Content-Length',
62-
'40',
6357
'Connection',
6458
'close',
6559
],
@@ -82,8 +76,6 @@ export function mockEthereumResponseSuccess(): void {
8276
'Tue, 22 Feb 2022 00:53:33 GMT',
8377
'Content-Type',
8478
'application/json',
85-
'Content-Length',
86-
'104',
8779
'Connection',
8880
'close',
8981
],
@@ -102,8 +94,6 @@ export function mockEthereumResponseSuccess(): void {
10294
'Tue, 22 Feb 2022 00:53:34 GMT',
10395
'Content-Type',
10496
'application/json',
105-
'Content-Length',
106-
'40',
10797
'Connection',
10898
'close',
10999
],
@@ -122,8 +112,6 @@ export function mockEthereumResponseSuccess(): void {
122112
'Tue, 22 Feb 2022 00:53:34 GMT',
123113
'Content-Type',
124114
'application/json',
125-
'Content-Length',
126-
'40',
127115
'Connection',
128116
'close',
129117
],
@@ -146,8 +134,6 @@ export function mockEthereumResponseSuccess(): void {
146134
'Tue, 22 Feb 2022 00:53:34 GMT',
147135
'Content-Type',
148136
'application/json',
149-
'Content-Length',
150-
'104',
151137
'Connection',
152138
'close',
153139
],
@@ -166,8 +152,6 @@ export function mockEthereumResponseSuccess(): void {
166152
'Tue, 22 Feb 2022 00:53:34 GMT',
167153
'Content-Type',
168154
'application/json',
169-
'Content-Length',
170-
'40',
171155
'Connection',
172156
'close',
173157
],
@@ -190,8 +174,6 @@ export function mockEthereumResponseSuccess(): void {
190174
'Tue, 22 Feb 2022 00:53:34 GMT',
191175
'Content-Type',
192176
'application/json',
193-
'Content-Length',
194-
'104',
195177
'Connection',
196178
'close',
197179
],
@@ -210,8 +192,6 @@ export function mockEthereumResponseSuccess(): void {
210192
'Tue, 22 Feb 2022 00:53:34 GMT',
211193
'Content-Type',
212194
'application/json',
213-
'Content-Length',
214-
'40',
215195
'Connection',
216196
'close',
217197
],
@@ -241,8 +221,6 @@ export function mockEthereumResponseSuccess(): void {
241221
'Tue, 22 Feb 2022 06:40:30 GMT',
242222
'Content-Type',
243223
'application/json',
244-
'Content-Length',
245-
'296',
246224
'Connection',
247225
'close',
248226
],

packages/composites/rocket-pool/test/integration/fixtures.ts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ export const mockETHSuccess = (): nock.Scope =>
2222
'Fri, 21 Oct 2022 06:39:28 GMT',
2323
'Content-Type',
2424
'application/json',
25-
'Content-Length',
26-
'40',
2725
'Connection',
2826
'close',
2927
'Vary',
@@ -50,8 +48,6 @@ export const mockETHSuccess = (): nock.Scope =>
5048
'Fri, 21 Oct 2022 06:39:29 GMT',
5149
'Content-Type',
5250
'application/json',
53-
'Content-Length',
54-
'103',
5551
'Connection',
5652
'close',
5753
'Vary',
@@ -78,8 +74,6 @@ export const mockETHSuccess = (): nock.Scope =>
7874
'Fri, 21 Oct 2022 06:39:30 GMT',
7975
'Content-Type',
8076
'application/json',
81-
'Content-Length',
82-
'103',
8377
'Connection',
8478
'close',
8579
'Vary',
@@ -110,8 +104,6 @@ export const mockUSDSuccess = (): nock.Scope =>
110104
'Fri, 21 Oct 2022 06:39:28 GMT',
111105
'Content-Type',
112106
'application/json',
113-
'Content-Length',
114-
'40',
115107
'Connection',
116108
'close',
117109
'Vary',
@@ -138,8 +130,6 @@ export const mockUSDSuccess = (): nock.Scope =>
138130
'Fri, 21 Oct 2022 06:39:29 GMT',
139131
'Content-Type',
140132
'application/json',
141-
'Content-Length',
142-
'103',
143133
'Connection',
144134
'close',
145135
'Vary',
@@ -166,8 +156,6 @@ export const mockUSDSuccess = (): nock.Scope =>
166156
'Fri, 21 Oct 2022 06:39:30 GMT',
167157
'Content-Type',
168158
'application/json',
169-
'Content-Length',
170-
'103',
171159
'Connection',
172160
'close',
173161
'Vary',
@@ -194,8 +182,6 @@ export const mockUSDSuccess = (): nock.Scope =>
194182
'Fri, 21 Oct 2022 06:46:11 GMT',
195183
'Content-Type',
196184
'application/json',
197-
'Content-Length',
198-
'38',
199185
'Connection',
200186
'close',
201187
'Vary',
@@ -251,8 +237,6 @@ export const mockUSDSuccess = (): nock.Scope =>
251237
'Fri, 21 Oct 2022 06:46:12 GMT',
252238
'Content-Type',
253239
'application/json',
254-
'Content-Length',
255-
'103',
256240
'Connection',
257241
'close',
258242
'Vary',
@@ -279,8 +263,6 @@ export const mockUSDSuccess = (): nock.Scope =>
279263
'Fri, 21 Oct 2022 06:46:13 GMT',
280264
'Content-Type',
281265
'application/json',
282-
'Content-Length',
283-
'103',
284266
'Connection',
285267
'close',
286268
'Vary',

packages/composites/savax-price/test/integration/fixtures.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ export function mockCoinpaprikaAdapterResponseSuccess() {
2727
'1636374693',
2828
'Content-Type',
2929
'application/json; charset=utf-8',
30-
'Content-Length',
31-
'92',
3230
'ETag',
3331
'W/"5c-z1n244ezdMwpLTzNvSBGxzBiHkA"',
3432
'Connection',
@@ -64,8 +62,6 @@ export function mockCoinpaprikaAdapterResponseZeroValue() {
6462
'1636374693',
6563
'Content-Type',
6664
'application/json; charset=utf-8',
67-
'Content-Length',
68-
'92',
6965
'ETag',
7066
'W/"5c-z1n244ezdMwpLTzNvSBGxzBiHkA"',
7167
'Connection',

packages/composites/set-token-index/test/integration/fixtures.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ export const mockDataProviderResponses = (): void => {
3030
'Express',
3131
'Content-Type',
3232
'application/json; charset=utf-8',
33-
'Content-Length',
34-
'714',
3533
'ETag',
3634
'W/"2ca-B0TkX1zAQfIfnHwQo6e4kGAEMCs"',
3735
'Date',

0 commit comments

Comments
 (0)