[Seaside] GZIP siaside.

Philippe Marschall philippe.marschall at gmail.com
Wed Sep 24 19:39:50 UTC 2008


2008/9/20 agnaldo4j <agnaldo4j at gmail.com>:
> Julian Fitzell escreveu:
>
> On Sat, Sep 20, 2008 at 3:25 PM, Philippe Marschall
> <philippe.marschall at gmail.com> wrote:
>
>
> 2008/9/19 agnaldo4j <agnaldo4j at gmail.com>:
>
>
> Sorry, my english is very limited.
>
> I use seaside with squeak 3.9.
> I have a desktop application developed in java, this desktop application
> send a gzip stream to server(seaside) and receive from the server a gzip
> stream.
>
>
> This doesn't sound very Seaside specific. Seaside only works over
> http(s), it's a web framework. It looks more like you need a generic
> Squeak/Smalltalk server.
>
>
> I'm not certain but is the question just about using GZIP content
> compression for the HTTP stream?
>
> Julian
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
>
> Correct Julian, is this.
> My request and response are in gzip mode, but in seside i don't undarstand
> how todo this.
> A example in Ruby on Rails:
> class TesteController < ApplicationController
>   protect_from_forgery :except => [:teste]
>
>   require 'zlib'
>
>   def teste
>     gz = Zlib::GzipReader.new(request.body)
>     puts gz.read
>
>     render :json => {:nome => "Agnaldo de Oliveira"}.to_json
>
>     StringIO.open('', 'w') do |strio|
>       gw = Zlib::GzipWriter.new(strio)
>       gw.write(response.body)
>       response.body = strio.string
>       gw.close()
>     end
>   end
> end

Sorry for not replying earlier. You can zip and unzip strings by
sending #zipped or #unzipped to them. To make that work in every case
you probably have to hack it into WAKom/Encoded or configure Apache
(see Julian's post).

Your post raises some other questions however, most importantly how
does the Java application interact with Seaside? E.g when and why does
it connect to Seaside? Why does the Java application use gzip? Is
there a way to turn it off in the Java application?

Cheers
Philippe


More information about the seaside mailing list