remy / inliner

Node utility to inline images, CSS and JavaScript for a web page - useful for mobile sites
MIT License
1.1k stars 165 forks source link

callback on non 200 status #40

Closed BradDenver closed 10 years ago

BradDenver commented 10 years ago

fix end event never being emitted and callback not being triggered if any resource returned a non 200 status.

For example when running inliner against http://remysharp.com the progress events show that three resources return non 200 status codes: get 301 on http://twitter.com/api/users/profile_image/rem get 301 on http://remy.github.com/twitterlib/twitterlib.min.js get 404 on http://leftlogic.com/images/favicon.png

This updates Inliner.get() to call its callback with and empty string if the resource returns a non 200 response.

remy commented 10 years ago

Doh, sorry, should have merged this. It's in now anyway.

BradDenver commented 10 years ago

thanks

BradDenver commented 10 years ago

Oh and can you publish the update to npm