scalaj-http
scalaj-http copied to clipboard
toResponse uses standard GZIPInputstream.
The README has an example of processing an event stream but the parser is given a standard GZIPInputStream, which isn't really suitable. See the "Gzip and Java" section of this page for more information. I'm not sure if this is something that should be changed in the code or just pointed out in the README. I can work on a pull req for this if desired.
Hmm, have you encountered a problem with this? what was your workaround?
When I try consuming a twitter stream that doesn't immediately have anything to give me it hangs indefinitely without responding to any new input. My workaround was to add a 'noStreamZip' setting to HttpOptions that gets checked in toResponse when it decides which stream type to give. If it's set it just gives back the inputstream without wrapping it in the GZIP. I then wrap it myself as suggested on the twitter page.