-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
GZIP compression support #177
Comments
I wouldn't mind taking a peek at this. I haven't been following the project for a while. How concerned are we with backwards compatibility? I would like to add this inside of the Response class, but if I add a parameter to the Response constructor (to specify the content-encoding), it would probably break a lot of usages. |
Great to hear, and much appreciated! We just recently committed a major change to Response, so now would be a perfect time to introduce this. Response is now created with a factory function instead of directly with a constructor. |
Yes, great just take case to keep the factory methods "clean". |
Maybe a separate toggle function, like |
I guess the factory methods in question are Fixed length responses may be a problem, since you would need to zip the entire InputStream before knowing the final size. I'll see what I can do. Let me know if you have any thoughts about this. |
I submitted a pull request now. I don't expose the |
Just checked the changes, they sound good thanks. @elonen do you concur that we can merge this? |
Yes. |
Merged with thanks! |
How can user enable GZIP compression?
And this request:
Produces this response:
UPD: Add something like this to your server:
Also there's no need to use |
add GZIP compression support to the server. (from #63)
The text was updated successfully, but these errors were encountered: