gin-contrib/gzip

Using GZIP with gin DataFromReader is not behaving correctly

uppalabharath opened this issue · 4 comments

I have a requirement where upon clicking a link the file gets downloaded. As the file may be large I use gin's DataFromReader so that the download can happen in chunks. But when the gzip compression is enabled, the file is getting corrupted and chrome shows some error like network error. I disabled the gzip middleware and it worked normally.

Any pointers on where to look or some configuration needs to be done for handling this correctly. Please advise.

I think this PR #27 relates to the problem I am facing. @appleboy Could you please review and do the merge if the changes look good and release a new tag..

Thanks

@uppalabharath I will take it.

Thanks @appleboy for quick action on this and thanks @segevfiner for the fix..