-
Notifications
You must be signed in to change notification settings - Fork 9
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
Could not write to the response multiple times #6
Comments
I'm trying to debug this and I'm seeing some bad interaction between my module and node's http module. I've been able to get two writes working, but then three writes won't work. I don't understand exactly what's going on, and since my current implementation is a total mess I fear I'll have to rewrite it completely to fix this bug. In the meantime you can work around this by buffering writes and submitting them in a single call to |
I think it's resolved now. Would you test the latest version from the master branch? It's a complete rewrite and I need to get some feedback before releasing it. |
Thank you and sorry for the delay. Now it seems to work except the fact that the body seems to be "chunked"-encoded. Repeating the experiment from my first post, I get:
while I expect wget to output only "ab". This may be a client issue, however using nginx's fastcgi client I get analogous results. |
Thank you for reporting this, it's my fault. I created a new issue: #8 |
It should be fixed now. |
I am having trouble with using two consecutive write()s into a response.
Steps to reproduce:
Expected results:
I would expect wget to output "ab".
Actual results:
wget outputs only "a".
Note 1:
If I used nginx with disabled buffering ("fastcgi_buffering off;") instead of "node_modules/.bin/fastcgi", the fastcgi server would crash with:
and wget would output only "a".
Note 2:
On the other hand, if I delay the call to res.end with setTimeout, everything works as expected:
The text was updated successfully, but these errors were encountered: