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

Sometimes no content, but disable images and it works #13

Closed
remy opened this issue Jan 2, 2012 · 2 comments
Closed

Sometimes no content, but disable images and it works #13

remy opened this issue Jan 2, 2012 · 2 comments

Comments

@remy
Copy link
Owner

remy commented Jan 2, 2012

Example:

inliner -v https://github.com/remy/inliner/

Needs investigation!

@agebrock
Copy link

Same here. Any further ideas ? Or possible way to enable error reporting ?

@mccartney
Copy link

I have the same problem with some sites, e.g. http://www.onet.pl (Polish popular news site).

I've debugging the problem for several hours and found out this is happening when some of the images return 302 HTTP error code. The code doesn't handle that properly:

      if (res.statusCode !== 200) {
        inliner.emit('progress', 'get ' + res.statusCode + ' on ' + url);
        body = ''; // ?
      } 

Funny thing is, even the comment // ? indicates unsure approach. For me it's enough to resort to the res.headers['location'], because the site refers to an image with a 302 redirection to a valid image.

The real problem with that code is that branch of processing doesn't return anything and doesn't call the callback(), so simply the method call ends with no followup (callback).

@remy remy closed this as completed in 2f6a3bb Jul 22, 2014
remy added a commit that referenced this issue Jul 22, 2014
kant added a commit to kant/inliner that referenced this issue Jul 17, 2018
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

3 participants