Skip to content
This repository has been archived by the owner on Apr 4, 2022. It is now read-only.

toResponse uses standard GZIPInputstream. #101

Open
cirrus8-craig opened this issue May 11, 2016 · 2 comments
Open

toResponse uses standard GZIPInputstream. #101

cirrus8-craig opened this issue May 11, 2016 · 2 comments

Comments

@cirrus8-craig
Copy link

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.

@hoffrocket
Copy link
Member

Hmm, have you encountered a problem with this? what was your workaround?

@cirrus8-craig
Copy link
Author

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants