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

No data returned when remote file exceeds certain size #54

Open
renefournier opened this issue Dec 2, 2016 · 1 comment
Open

No data returned when remote file exceeds certain size #54

renefournier opened this issue Dec 2, 2016 · 1 comment

Comments

@renefournier
Copy link

Also, this is intermittent, sometimes it works, usually does not:

`
'use strict';

const curl = require('curlrequest')
;

const feed = 'http://theartofcharmpodcast.theartofcharm.libsynpro.com/rss'; # Around 2.5MB

let options = {
url: feed,
verbose: true,
stderr: true,
retries: 3,
timeout: true,
headers: {
'Accept-Encoding': 'gzip'
}
};
curl.request(options, (err, data) => {
if (err) {
console.error (: C ${feed} [ERROR] ${err});
} else {
if ( ! data) {
console.log (: B ${feed} [NO DATA]);
} else {
console.log (: B ${feed} ${data.length});
}
}
});

`

@renefournier
Copy link
Author

I realized it's because the timeout is set to true, and the request fails because the download exceeds the default limit. Problem is, when I specify timeout: 30, I get an error "[ERROR] Failed to connect to host" every time.

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

No branches or pull requests

1 participant