Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

raw-body will hang when the param is a parsed body #57

Closed
ziyofun opened this issue Mar 24, 2018 · 3 comments
Closed

raw-body will hang when the param is a parsed body #57

ziyofun opened this issue Mar 24, 2018 · 3 comments

Comments

@ziyofun
Copy link
Contributor

ziyofun commented Mar 24, 2018

Hi, thanks for your work on this repo.
I use raw-body and koa-joi-router which depends on raw-body in my project the same time.
I found that the body already parsed can not emit any listener in readStream function of raw-body even if the stream.readable is false.
It may be better if throw some error of just return the parsed body this situation.

@dougwilson
Copy link
Member

That sounds like a good idea. Even #32 getting implemented would help here as well, since the timeout would trigger in that situation.

Do you want to make a pull request or provide code that I can run which demonstrates the issue so I can make the change?

@ziyofun
Copy link
Contributor Author

ziyofun commented Mar 25, 2018

OK, I create a PR #58 to check the validation of stream but I dont think timeout is a good solution, it maybe means more work to distinguish error and just timeout.

@zandaqo

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants