You are viewing a plain text version of this content. The canonical link for it is here.
Posted to websh-user@tcl.apache.org by Lost One <th...@yahoo.com> on 2010/05/29 11:14:14 UTC

Http gzip content

Hi there,

After using and learning how websh works i started to like it although I still have much to learn.
Most of the things like HTTP redirection, file transfer where resolved from learning how PHP and other languages handle these..then finding how they work in websh.

I have a question, i have apache with mod_deflate and what i'm trying is to send a gzipped content to the browser.. but it doesn't seem to work. When I try to send a gzipped content to the page all i get is "Content Encoding Error
The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression."

What I do is this:
    web::response -set Content-Encoding "gzip"    
    web::put [zlib gzip "<h1>Some simple gzipped content!</h1>" -level 9]

When i try zlib deflate i get the same thing.

You guys have any ideea how it's done? Or do I have to find a way to configure the gzip'ing from the side of the apache?

Thanks in advance,
Clinciu Andrei
 



      

Re: Http gzip content

Posted by Ronnie Brunner <ro...@netcetera.ch>.
> I have a question, i have apache with mod_deflate and what i'm trying is to send a gzipped content to the browser.. but it doesn't seem to work. When I try to send a gzipped content to the page all i get is "Content Encoding Error
> The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression."
> 
> What I do is this:
>     web::response -set Content-Encoding "gzip"    
>     web::put [zlib gzip "<h1>Some simple gzipped content!</h1>" -level 9]
> 
> When i try zlib deflate i get the same thing.

Don't know what happens, but one issue might be that the standard
output channel is not set to binary (i.e. does some translation). Did
you try adding

    fconfigure [web::response] -translation binary 

before your first [web::put]? On the other hand: did you try to check
what actually arrives on the browser side? Maybe a manual telnet to
your URL might reveal yet another problem.

hth
Ronnie
-- 
Ronnie Brunner | ronnie.brunner@netcetera.ch
phone +41-44-247 79 79 | fax +41-44-247 70 75
Netcetera AG | 8040 Zürich | Switzerland | http://netcetera.ch

---------------------------------------------------------------------
To unsubscribe, e-mail: websh-user-unsubscribe@tcl.apache.org
For additional commands, e-mail: websh-user-help@tcl.apache.org