Skip to content
Myr

deps: body-parser@2.0.0-beta.1

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Douglas Christopher Wilson · committed by Douglas Christopher Wilson · parent 1574925 · Browse files · 8 files+23 added−14 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

8 files+23 added−14 removed

  • tests:+10 added−10 removed
  • other:+13 added−4 removed

8 files+23 added−14 removed

modified:examples/auth/index.js+2 added-1 removed
modified:examples/cookies/index.js+6 added-2 removed
modified:test/express.json.js+2 added-2 removed
310 unmodified lines
311 request(this.app)312 .post('/')313 .set('Content-Type', 'application/json')314 .send('{"user":"tobi"}')315 .expect(200, '{}', done)315 .expect(200, '', done)316 })317 })318319 describe('when ["application/json", "application/vnd.api+json"]', function () {
23 unmodified lines
343 request(this.app)344 .post('/')345 .set('Content-Type', 'application/x-json')346 .send('{"user":"tobi"}')347 .expect(200, '{}', done)347 .expect(200, '', done)348 })349 })350351 describe('when a function', function () {
313 unmodified lines
modified:test/express.raw.js+2 added-2 removed
180 unmodified lines
181 it('should ignore standard type', function (done) {182 var test = request(this.app).post('/')183 test.set('Content-Type', 'application/octet-stream')184 test.write(Buffer.from('000102', 'hex'))185 test.expect(200, '{}', done)185 test.expect(200, '', done)186 })187 })188189 describe('when ["application/octet-stream", "application/vnd+octets"]', function () {
20 unmodified lines
210 it('should ignore "application/x-foo"', function (done) {211 var test = request(this.app).post('/')212 test.set('Content-Type', 'application/x-foo')213 test.write(Buffer.from('000102', 'hex'))214 test.expect(200, '{}', done)214 test.expect(200, '', done)215 })216 })217218 describe('when a function', function () {
169 unmodified lines
modified:test/express.text.js+2 added-2 removed
193 unmodified lines
194 request(this.app)195 .post('/')196 .set('Content-Type', 'text/plain')197 .send('user is tobi')198 .expect(200, '{}', done)198 .expect(200, '', done)199 })200 })201202 describe('when ["text/html", "text/plain"]', function () {
21 unmodified lines
224 request(this.app)225 .post('/')226 .set('Content-Type', 'text/xml')227 .send('<user>tobi</user>')228 .expect(200, '{}', done)228 .expect(200, '', done)229 })230 })231232 describe('when a function', function () {
209 unmodified lines
modified:test/express.urlencoded.js+4 added-4 removed
71 unmodified lines
72 .send('user=tobi')73 .expect(200, '{"user":"tobi"}', done)74 })7576 it('should parse extended syntax', function (done) {76 it('should not parse extended syntax', function (done) {77 request(this.app)78 .post('/')79 .set('Content-Type', 'application/x-www-form-urlencoded')80 .send('user[name][first]=Tobi')81 .expect(200, '{"user":{"name":{"first":"Tobi"}}}', done)81 .expect(200, '{"user[name][first]":"Tobi"}', done)82 })8384 describe('with extended option', function () {85 describe('when false', function () {
354 unmodified lines
440 request(this.app)441 .post('/')442 .set('Content-Type', 'application/x-www-form-urlencoded')443 .send('user=tobi')444 .expect(200, '{}', done)444 .expect(200, '', done)445 })446 })447448 describe('when ["urlencoded", "application/x-pairs"]', function () {
23 unmodified lines
472 request(this.app)473 .post('/')474 .set('Content-Type', 'application/x-foo')475 .send('user=tobi')476 .expect(200, '{}', done)476 .expect(200, '', done)477 })478 })479480 describe('when a function', function () {
254 unmodified lines
modified:History.md+4 added
1 unmodified line
2===34This incorporates all changes after 4.17.1 up to 4.17.2.56 * deps: body-parser@2.0.0-beta.17 - `req.body` is no longer always initialized to `{}`8 - `urlencoded` parser now defaults `extended` to `false`9 - Use `on-finished` to determine when body read10 * deps: router@2.0.0-beta.111 - Add new `?`, `*`, and `+` parameter modifiers12 - Internalize private `router.process_params` method13 - Matching group expressions are only RegExp syntax
3640 unmodified lines
modified:package.json+1 added-1 removed
28 unmodified lines
29 ],30 "dependencies": {31 "accepts": "~1.3.7",32 "array-flatten": "2.1.1",33 "body-parser": "1.19.1",33 "body-parser": "2.0.0-beta.1",34 "content-disposition": "0.5.4",35 "content-type": "~1.0.4",36 "cookie": "0.4.1",37 "cookie-signature": "1.0.6",
63 unmodified lines