# Zlib::Deflate.deflate problem

**URL:** <https://www.ruby-forum.com/t/zlib-deflate-deflate-problem/108090>\
**Category:** Ruby\
**Created:** [June 28, 2007, 11:44pm UTC](https://www.ruby-forum.com/t/zlib-deflate-deflate-problem/108090 "2007-06-28T23:44:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ktheory](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/e480ec/32.png) [@ktheory](https://www.ruby-forum.com/u/ktheory)\
**Post date:** [June 28, 2007, 11:44pm UTC](https://www.ruby-forum.com/t/zlib-deflate-deflate-problem/108090/1 "2007-06-28T23:44:21Z")

</div>

Hey all,

I’m using Zlib::Deflate.deflate to deflate a response from an HTTP  
request to return back to the browser. The requests accept gzip,deflate  
but when I return the deflated data the browser is not handling it  
correctly…

any ideas where to look to debug?

thanks  
Aaron

---

<div class="post-metadata">

**Author:** ![ktheory](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/e480ec/32.png) [@ktheory](https://www.ruby-forum.com/u/ktheory)\
**Post date:** [June 28, 2007, 11:51pm UTC](https://www.ruby-forum.com/t/zlib-deflate-deflate-problem/108090/2 "2007-06-28T23:51:54Z")

</div>

Aaron S. wrote:

> Hey all,
> 
> I’m using Zlib::Deflate.deflate to deflate a response from an HTTP  
> request to return back to the browser. The requests accept gzip,deflate  
> but when I return the deflated data the browser is not handling it  
> correctly…
> 
> any ideas where to look to debug?
> 
> thanks  
> Aaron

little more info… I’m using WebRick, LightTPD, and Mongrel…

I was looking at mongrel source and see that I was missing the  
Content-Encoding. But not sure where to set that for each server…
