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

Error content length when readstream have start and end options #71

Closed
lfeng opened this issue Jun 17, 2014 · 2 comments
Closed

Error content length when readstream have start and end options #71

lfeng opened this issue Jun 17, 2014 · 2 comments
Assignees

Comments

@lfeng
Copy link

lfeng commented Jun 17, 2014

I create a readstream with start and end options,the getLength get a error size

fs.createReadStream('sample.txt', {start: 90, end: 99});

lib/form_data.js line 82

      fs.stat(value.path, function(err, stat) {
        if (err) {
          next(err);
          return;
        }

        next(null, stat.size);
      });  
@lfeng lfeng changed the title error content length when readstream have start and end options Error content length when readstream have start and end options Jun 17, 2014
@alexindigo
Copy link
Member

Good catch, thanx.

alexindigo added a commit to alexindigo/form-data that referenced this issue Jun 22, 2014
@alexindigo alexindigo self-assigned this Jun 23, 2014
alexindigo added a commit that referenced this issue Jun 24, 2014
#71 Respect bytes range in a read stream.
alexindigo added a commit that referenced this issue Jun 24, 2014
#71 Respect bytes range in a read stream.
@alexindigo
Copy link
Member

Pushed to NPM.

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

2 participants