You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What are you trying to achieve or the steps to reproduce?
In formidable v2/v3 the parsing is async and the 'data' handlers are attached not directly. This causes an issue that if you have multiple async things happening after the request was started other consumers might consume the buffered 'data' chunks. Then formidable is not able to parse the request anymore since it receives only a part of it.
An easy fix for that would be to attach the handlers earlier - at the beginning when calling parse.
See microsoft/playwright#35823 (comment) for more information. We would appreciate if this could considered since it breaks our use-case and potentially also other customers with async/await hops.
What was the result you got?
When there is an async hop which is consuming 'data' as well, formidable is not able to parse the request body.
What result did you expect?
It works like in formidable v1 - there the parsing was sync.
The text was updated successfully, but these errors were encountered:
Anyway, please try the next dist-tag, a lot of the stuff around streaming is tricky and especially with events it sucks, so that's cleaned up. It uses async iterators and for of.
Plesse try the v4 (the next dist-tag, it's in monorepo branch), i don't want to bother anymore with that shitty useless layer (a Formidable EventEmitter class) that's sitting on top of the actual parser.
The parsing wasn't async, nor sync. And isn't now. The buggy layer on top of the core parser is what's causing all the issues and weirdnesses. The parse method just got async in some version. In fact it always was async, just with callbacks back in the days.
It's not the v3 that's the problem, but something else, because we were always async, and we were always reading data events from req at that same place.
Uh oh!
There was an error while loading. Please reload this page.
Support plan
Context
What are you trying to achieve or the steps to reproduce?
In formidable v2/v3 the parsing is async and the
'data'
handlers are attached not directly. This causes an issue that if you have multiple async things happening after the request was started other consumers might consume the buffered 'data' chunks. Then formidable is not able to parse the request anymore since it receives only a part of it.An easy fix for that would be to attach the handlers earlier - at the beginning when calling parse.
Currently they are attached after
writeHeaders
:formidable/src/Formidable.js
Line 233 in d0fbec1
See microsoft/playwright#35823 (comment) for more information. We would appreciate if this could considered since it breaks our use-case and potentially also other customers with async/await hops.
What was the result you got?
When there is an async hop which is consuming 'data' as well, formidable is not able to parse the request body.
What result did you expect?
It works like in formidable v1 - there the parsing was sync.
The text was updated successfully, but these errors were encountered: