users@glassfish.java.net

Re: Gzip encoding

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Mon, 22 Sep 2008 12:18:38 -0400

Salut,

Patrick Julien wrote:
> [#|2008-09-22T10:58:19.459-0500|INFO|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=18;_ThreadName=httpSSLWorkerThread-8080-0;|SocketChannel
> headersjava.nio.channels.SocketChannel[connected local=/72.3.236.85:8080
> <http://72.3.236.85:8080> remote=/70.53.186.38:60471
> <http://70.53.186.38:60471>] are: === MimeHeaders ===
> host = services00.spectrumdt.com <http://services00.spectrumdt.com>
> connection = close
> authorization = Basic /*Removed*/
> user-agent = Profile/MIDP-2.0 Configuration/CLDC-1.1
> content-language = en
> accept = application/json
> accept-encoding = gzip
>
> The accept-encoding is still there, however, the payload is indeed json
> instead of gzip compressed json. Adding the port, I get compressed json.

C'est bizarre...I don't understand why the headers are changed by just
modifying the port. Are you sure there is nothing inbetween? For sure
GlassFish is not in fault here. A possible workaround is to add in
domain.xml, under http-listener:

<property name="compressableMimeType" value="application/json"/>

Can you try that and see?

A+

-- Jeanfrancois




>
>
>
>
> On Mon, Sep 22, 2008 at 11:53 AM, Jeanfrancois Arcand
> <Jeanfrancois.Arcand_at_sun.com <mailto:Jeanfrancois.Arcand_at_sun.com>> wrote:
>
> Salut,
>
>
> Patrick Julien wrote:
>
> Yes, I can, but what is it that you want precisely? The http
> headers of the client? The http headers from the server
> response? Logs from the server?
>
> Also, if I'm not mistaken, you want this option to be set in the
> JVM settings of the server?
>
>
> Yes, sorry for the confusion. Send me the server.log.
>
> A+
>
> -- Jeanfrancois
>
>
>
> On Mon, Sep 22, 2008 at 10:47 AM, Jeanfrancois Arcand
> <Jeanfrancois.Arcand_at_sun.com
> <mailto:Jeanfrancois.Arcand_at_sun.com>
> <mailto:Jeanfrancois.Arcand_at_sun.com
> <mailto:Jeanfrancois.Arcand_at_sun.com>>> wrote:
>
> Salut,
>
>
> Patrick Julien wrote:
>
> I've been able to get gzip encoding to work but the server
> performs the gzip compression if and only if the port is
> specified.
>
> I have glassfish v2ur2 on Linux. The http listener is on
> port
> 8080 and I'm using iptables to redirect port 80 to port
> 8080 in
> order to avoid running glassfish as root.
>
> Now, if I access the server by http://x.y.z.w:8080, the http
> response is encoded with gzip. Accessing the server with
> only
> http://x.y.z.w however I get a response that isn't
> encoded with
> gzip.
>
> Must something specific be done in the configuration of
> the http
> listener here or is this a bug?
>
>
> Can you add the following property and send back the result
> when you
> send http://x.y.z.w?
>
> -Dcom.sun.enterprise.web.connector.grizzly.enableSnoop=true
>
> I suspect some headers are lost and that compression algorithm
> doesn't apply.
>
> Thanks
>
> -- Jeanfrancois
>
>
>
>
> -- http://www.spectrumdt.com
> http://codepimps.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe_at_glassfish.dev.java.net
> <mailto:users-unsubscribe_at_glassfish.dev.java.net>
> <mailto:users-unsubscribe_at_glassfish.dev.java.net
> <mailto:users-unsubscribe_at_glassfish.dev.java.net>>
>
> For additional commands, e-mail:
> users-help_at_glassfish.dev.java.net
> <mailto:users-help_at_glassfish.dev.java.net>
> <mailto:users-help_at_glassfish.dev.java.net
> <mailto:users-help_at_glassfish.dev.java.net>>
>
>
>
>
>
> --
> http://www.spectrumdt.com
> http://codepimps.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> <mailto:users-unsubscribe_at_glassfish.dev.java.net>
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
> <mailto:users-help_at_glassfish.dev.java.net>
>
>
>
>
> --
> http://www.spectrumdt.com
> http://codepimps.org
>