-
Notifications
You must be signed in to change notification settings - Fork 129
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
How to force flushing from the wrapped handler? #87
Comments
I'm not quite sure I follow the problem, sorry. Could you please provide more context as to what you're trying to do? The |
I'm running into Lines 252 to 255 in dd04395
|
If there's nothing to flush....what would we flush there? It gets back to the point that if a response is too small, there's no benefit to gzip it and if there's nothing yet written, there's nothing to flush? It sounds like having no |
Well, I would argue that when I call .Flush(), it shouldn't be ignored, and if not enough bytes came in to justify compression yet, it should either just turn off compression for this response, or turn it on to be on the safe side in case it will be a long-lived response, but not simply ignore the flush. Minsize is a workaround, so now other responses that don't need flushing but are still small will still get the compression overhead. It took me some digging to find why it wasn't flushing… At the very least it could be mentioned? |
* gzhttp: Support Flush always Fixes nytimes/gziphandler#87
I would like to quickly flush from one of my handlers but the response is too small and it ignores the flush.
As a workaround, I set the minsize to 0. What can I do to force flushing?
The text was updated successfully, but these errors were encountered: