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
Piped responses truncated when running under node 0.8.x #511
Comments
Same problem! |
same problem. piped exemple doesn't work. Node 0.10.22 / Express 3 |
is the stream ending without finishing the data or is it getting paused? |
My web browser initiate a request. Node log shows the http loggers entries after a long time, and since those logs show up, browser say request is incomplete (no response) |
I also ran into this issue using Upgrading to |
Is this still an issue? This is so old I'm closing, if it is actually still an issue just let me know and I'll re-open. |
Sorry but nothing changed so this is still an issue. I may be due to POST request excpting a form() parameter ? |
This is definitely still an issue! node@0.10.33, request@2.51.0. This was working fine actually using node@0.10.33, request@2.46.0, but after upgrade we started having the issue. |
This is affecting a project I'm working on as well. I can't find a version combo that resolves the issue. |
Ah, it seems if |
I'm running into what I think is the same issue. Specifically I've got a program that writes the response to an HTTP(S) request to stdout using When writing directly to the console ( When writing to a file ( When piping to another process (eg. The truncation appears to happen consistently after 1024 bytes (or characters, at least). Strangely enough, while:
each of:
yield the same result (specifically In other words, it may be the case that the truncation is only a visual one. While not all the characters appear on the terminal, the Is it possible an extra Note that all of this is independent of the specific data in my file -- this is not a function of the particular character found at the 1024th position in the file. This is also independent of the command to which the stream is being piped, or at least there is more than one command that sees the truncated stream (e.g., the aforementioned Setting Versions:
|
@rodw I suspect that it is just an intermittent issue rather than something related to visual display or which command comes next in the chain. Any chance you could give us a self-contained test case that either reports success or failure (and fails sometimes)? |
@nylen There's really nothing intermittent about it - in the cases in which this "fails", it fails every time in exactly the same way and at exactly the same place. (Suspiciously right at 1024 bytes.) I'll try to pull together a simple test case, but I don't think I'm doing much more than this example from the README |
@nylen Oddly enough, it appears that the underlying issue is related to an interaction between For example, using this program: var request = require('request');
request.get("https://github.com/request/request/issues/511").pipe(process.stdout); the command: node issue-511.js and node issue-511.js | cat give the same results. However, if we load the var TermList = require('term-list');
var request = require('request');
request.get("https://github.com/request/request/issues/511").pipe(process.stdout); Now: node issue-511.js works the same as before, but: node issue-511.js | cat is truncated after 1024 characters and throws an error, as in the following output:
I don't know which module is doing something wrong (if either), but this sort of makes sense as I'm not sure if this is exactly the same issue as others on this thread are seeing, but the basic symptoms are quite similar. |
Actually, it's not even The following program creates the issue: require("keypress")(process.stdin);
var request = require('request');
request.get("https://github.com/request/request/issues/511").pipe(process.stdout); but taking out line 1, or just changing it to |
Seeing this issue under node v4.4.7, request v.2.75.0 on Windows 10 (anniversary edition, under the Linux Subsystem). Same identical code runs fine on node v6.6.0, request v2.75.0 on OS X. Have never used the I am only seeing it on fairly large sized resources. For a specific URL where I expect a bit over 3344 * 1k bytes back, if I pass the option |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I'm using this module to forward certain incoming requests to a backend server:
However, when the
dbReq
returns a large amount of data the response often gets truncated running under node 0.8.x. I've confirmed that the upstream server is returning valid data, but the debugging logs on the 'data' events show only what the client is seeing: a bunch of output during the the first part of thedbReq
response but then suddenly stopping.Running under node.js 0.10.x seems to fix (or at least mask) the problem.
The text was updated successfully, but these errors were encountered: