tomas/needle — pull request #54 by solatis (2014-03-26 13:29:59+00:00)
Title: Iconv

Hi tomas,

I don't know whether you noticed my line comment, but with your change to the charset decoder to `iconv-lite` the library now completely buffers the entire response before converting charset. Not the way it's supposed to be.

What I did was leave it up to the end user: let them install the library they want. `iconv` is a way bigger dependency, but allows for streaming content. `iconv-lite` is a small dependency, but requires to buffer content. With this, I also removed the required dependency on iconv-lite.

I also made a very thorough spec file for the `iconv` testing. It tests all three code paths. It does uninstall and reinstall the dependencies at runtime, so there's a bit of noise on stdout, but that's (mostly) because of `iconv`.