Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion coce.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ CoceFetcher.prototype.aws = function awsFetcher(ids) {
};
https.get(opts, (res) => {
const url = `https://${opts.hostname}${opts.path}`;
if (res.statusCode === 200 || res.statusCode === 403) repo.addurl('aws', id, url);
if (res.statusCode === 200 || res.statusCode === 403) {
// 43 bytes is the size of 1x1px gif returned by Amazon
if (res.headers['content-length'] !== '43') repo.addurl('aws', id, url);
}
repo.increment();
i += 1;
// timeout for next request
Expand Down