Skip to content

Commit f0a137e

Browse files
committed
chore: drop comment and issue refrences, drop sparse array test
1 parent c0b4eaa commit f0a137e

2 files changed

Lines changed: 1 addition & 16 deletions

File tree

lib/utils.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -288,11 +288,6 @@ function createETagGenerator (options) {
288288
function parseExtendedQueryString(str) {
289289
return qs.parse(str, {
290290
allowPrototypes: true,
291-
// qs >= 6.14 enforces a default arrayLimit of 20, which collapses larger
292-
// repeated-key query strings into objects. Raise the limit to 1000 to
293-
// restore the pre-6.14 behavior for common payloads while still bounding
294-
// single-parameter array expansions like `arr[999999]=x`. Matches the
295-
// parameter limit used elsewhere in the query parser. See #7147.
296291
arrayLimit: 1000
297292
});
298293
}

test/req.query.js

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ describe('req', function(){
3939
.expect(200, '{"user.name":"tj"}', done);
4040
});
4141

42-
it('should parse more than 20 repeated values as an array (#7147)', function (done) {
42+
it('should parse more than 20 repeated values as an array', function (done) {
4343
var app = createApp('extended');
4444
var ids = [];
4545
var expected = [];
@@ -52,16 +52,6 @@ describe('req', function(){
5252
.get('/?' + ids.join('&'))
5353
.expect(200, JSON.stringify({ ids: expected }), done);
5454
});
55-
56-
it('should still reject array expansion beyond arrayLimit (#7147)', function (done) {
57-
var app = createApp('extended');
58-
59-
// A single parameter with an index past arrayLimit (1000) must not
60-
// allocate a sparse array; qs collapses it to an object.
61-
request(app)
62-
.get('/?arr[9999]=x')
63-
.expect(200, '{"arr":{"9999":"x"}}', done);
64-
});
6555
});
6656

6757
describe('when "query parser" is simple', function () {

0 commit comments

Comments
 (0)