koa 3.2.0 → 3.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/request.js +2 -1
  2. package/package.json +1 -1
package/lib/request.js CHANGED
@@ -392,7 +392,8 @@ module.exports = {
392
392
  get length () {
393
393
  const len = this.get('Content-Length')
394
394
  if (len === '') return
395
- return ~~len
395
+ const parsed = Number.parseInt(len, 10)
396
+ return Number.isNaN(parsed) ? undefined : parsed
396
397
  },
397
398
 
398
399
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "koa",
3
- "version": "3.2.0",
3
+ "version": "3.2.1",
4
4
  "description": "Koa web app framework",
5
5
  "main": "lib/application.js",
6
6
  "exports": {