Comments (9)
Strange. It's not on L125, but okey. Can you give the full stack and use case example?
from hela.
Occurs when:
- There is no data in the request body.
- Specified filesKey = false
- Request multipart
from hela.
@isdenya thanks for the info. I'm working on next release locally.
from hela.
This same bug happens if you post an empty body with fieldsKey = false.
At line L115 (returns = cache.fields;
) returns
is set to undefined, so when you get to L125 (returns[filesKey] = cache.files;
) you're assigning a field of an undefined object, and it breaks.
from hela.
@sedenardi good point.
from hela.
@tunnckoCore I think the main issue is that L87 this.request.body !== undefined
fails because you're posting with an empty body. I usually use an empty body when implementing /Logout
in my APIs, so I think this is a valid use case.
from hela.
Agreed. 👍
I'm trying to come to this as soon as possible, or at least to push my local things to new branch and to be able others to continue.
PRs are always welcome, i'm just too busy and i'm not using this package anywhere atm.
from hela.
@tunnckoCore Cool. I'll run my possible fix through a couple of different scenarios and make sure your tests don't break and submit a PR in the next few days.
from hela.
Yea, thanks. If you can easy fix it for current version it would be great. I'm open.
from hela.
Related Issues (20)
- support for ts HOT 5
- Body or fields not reflecting the data passed in request params for route type DELETE HOT 2
- actory HOT 1
- koa deprecated Support for generators will be removed in v3. HOT 3
- How to save uploaded files in folder which name is session id in cookie? HOT 1
- koa-body-parser version using git url HOT 1
- Weekly Digest (10 February, 2019 - 17 February, 2019)
- Weekly Digest (17 February, 2019 - 24 February, 2019)
- Weekly Digest (24 February, 2019 - 3 March, 2019)
- Weekly Digest (3 March, 2019 - 10 March, 2019)
- tunnckoCore/body-parsers doesn' HOT 1
- Announcement: Migration to monorepo. Important, please read! HOT 1
- it doesn't work with latest egg.js HOT 1
- sasa
- eslint: implement RFC#9
- eslint: engine.isPathIgnored is perf hit of ~1sec
- hela/yaro switch to `sywac` or `yargs` or `cac` HOT 1
- bug in parse() HOT 1
- npm i koa-better-body is install error HOT 1
- Action Required: Fix Renovate Configuration
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hela.