lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hello,

I'm trying to use Tiago Dionizio's lzlib library (lzlib-0.2) to compress some HTTP responses.

lzlib itself seems to work fine, but I'm somewhat at loss on how to use it properly.

Right now I'm doing the following on the server side:

local zlib = require( "zlib" )
local aCompressedContent = zlib.compress( aContent )

http://dev.alt.textdrive.com/file/LW/LWResponse.lua

However, when a browser tries to decode such response, I get the following exception:

"gzip stream does not have a gzip header"

What am I doing wrong? Do I need to provide additional parameters to zlib.compress()?

Thanks for any help :)

Cheers,

R.