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
which then skips the handler. Putting a return right before this line makes the request get handled correctly.
In node v14.16, an end event is received before the handler is called (where it's receiving close in node v16), and close is received after the handler has finished.
What result did you expect?
Don't hang!
The text was updated successfully, but these errors were encountered:
I believe the issue here is that hapi v18 is not supported on node v16. In node v16 the semantics of http req/res events have changed in notable ways, addressed in hapi v20 with #4225. Your best bet will be to downgrade node to v14 or upgrade hapi to v20.
Here I am over 8 months later just having faced this problem and I am glad to see I am not the only one. I appreciate that there is a resolution to this POST hanging issue.
Support plan
Context
What are you trying to achieve or the steps to reproduce?
What was the result you got?
POST requests hangs and never calls handler. Related to this issue which mentioned both POST and OPTIONS hang in node v16. I've discovered
internals.event
inrequest.js
(https://github.com/hapijs/hapi/blob/master/lib/request.js#L701) receives a'close'
event, which then does:which then skips the handler. Putting a return right before this line makes the request get handled correctly.
In node v14.16, an
end
event is received before the handler is called (where it's receivingclose
in node v16), andclose
is received after the handler has finished.What result did you expect?
Don't hang!
The text was updated successfully, but these errors were encountered: