quality@glassfish.java.net

Re: Fwd: gzip compression

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Tue, 27 Oct 2009 15:57:38 -0400

Salut,

Sudipa Bhattacharya wrote:
>> [...] or a numerical integer value (which is equivalent to
>> "on", but specifies the minimum amount of data before the output is
>> compressed).
>>
>
> So this will bipass "compressionMinSize " and set min size to "x" if we set "compression=x" (where x is integer) , right ?
> I will need to add a test for the same then.

Yes.

>
> Thanks, Jan, for pointing this out !

Thanks!

--Jeanfrancois


>
> --Sudipa
>
>
> ----- Original Message -----
> From: Jan Luehe <Jan.Luehe_at_Sun.COM>
> Date: Tuesday, October 27, 2009 11:52 am
> Subject: Re: Fwd: gzip compression
> To: quality_at_glassfish.dev.java.net
> Cc: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
>
>
>> On 10/27/09 10:55, Sudipa Bhattacharya wrote:
>>> It should be "compression=on ".
>>> The allowed values for compression should be "on", "off" and "force"
>> .
>>>
>> [...] or a numerical integer value (which is equivalent to
>> "on", but specifies the minimum amount of data before the output is
>> compressed).
>>
>> Jan
>>
>>> It will still not work (not until b68) as it is fixed in grizzly and
>> will work after next Grizzly integration.
>>> Please see the issue at :
>>> https://glassfish.dev.java.net/issues/show_bug.cgi?id=10040
>>>
>>> Thanks,
>>> Sudipa
>>>
>>> ----- Original Message -----
>>> From: Judy Tang <Judy.J.Tang_at_Sun.COM>
>>> Date: Monday, October 26, 2009 11:17 pm
>>> Subject: Re: Fwd: gzip compression
>>> To: quality_at_glassfish.dev.java.net
>>> Cc: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
>>>
>>>
>>>
>>>> Hi Felipe,
>>>>
>>>> "what is the domain.xml fragment I should have in the latest version
>> ?"
>>>> Let me cc Jeanfrancois in the loop to help with your question above.
>> Thanks Jeanfrancois !
>>>> Thanks,
>>>> Judy
>>>>
>>>>
>>>> Felipe Gaścho wrote:
>>>>
>>>>> Anyone can clarify this for me ? (please check below the confuse
>>>>> thread in the users list)
>>>>>
>>>>> I am trying to enable compression in GFv3 b69
>>>>>
>>>>> what exactly the domain.xml shold looks like ?
>>>>>
>>>>>
>>>>>
>>>>> <network-config>
>>>>> <protocols>
>>>>> <protocol name="http-listener-1">
>>>>> <http default-virtual-server="server"
>>>>> max-connections="250" compression="true" compressionMinSize="1500"
>>>>> server-name="">
>>>>> <file-cache enabled="false" />
>>>>> <property name="compressableMimeType"
>>>>> value="text/html,text/xml,text/plain,image/gif,image/jpeg,image/png,text/css,text/javascript,application/json,application/xml"
>>>>> />
>>>>> </http>
>>>>> </protocol>
>>>>>
>>>>> ???
>>>>>
>>>>>
>>>>>
>>>>> ---------- Forwarded message ----------
>>>>> From: Nandini Ektare <Nandini.Ektare_at_sun.com>
>>>>> Date: Mon, Oct 26, 2009 at 7:20 PM
>>>>> Subject: Re: gzip compression
>>>>> To: users_at_glassfish.dev.java.net
>>>>>
>>>>>
>>>>> Hmm..bean validation does not treat compression as boolean. Did anyone
>>>>> change this ?
>>>>>
>>>>> In Grizzly 1_9_18e branch (latest one integrated into v3) we have
>>>>>
>>>>> Http.java
>>>>> @Attribute(defaultValue = "false", dataType = String.class)
>>>>> String getCompression();
>>>>>
>>>>> void setCompression(String compression);
>>>>>
>>>>> In latest GFv3 trunk we have
>>>>>
>>>>> There is a property compression in HttpListener.java which is also
>> not
>>>>> constrained as specified.
>>>>> @PropertyDesc(name="compression", defaultValue="off",
>>>>> values={"off","on","force"},
>>>>> description="Specifies use of HTTP/1.1 GZIP compression to
>>>>> save server bandwidth. " +
>>>>> "A positive integer specifies the minimum amount of data
>>>>> required before the output is compressed. " +
>>>>> "If the content-length is not known, the output is
>>>>> compressed only if compression is set to 'on' or 'force'" ),
>>>>>
>>>>> -Nandini
>>>>>
>>>>> Jan Luehe wrote:
>>>>>
>>>>> On 10/26/09 03:59, w.rittmeyer_at_jsptutorial.org wrote:
>>>>>
>>>>> Hi Felipe,
>>>>>
>>>>> I do not know for sure if this is the reason for your problem, but
>> the
>>>>> attribute "compression" is now of type boolean.
>>>>>
>>>>> Maybe you should try to use "true" instead.
>>>>>
>>>>> See the output of asadmin set:
>>>>>
>>>>> asadmin> set server.network-config.protocols.protocol.http-listener-1.http.compression=force
>>>>> com.sun.enterprise.admin.cli.CommandException: remote failure: Could
>>>>> not change the attributes: org.jvnet.hk2.config.ValidationException:
>>>>> Validation Failed: force is not of data type: java.lang.Boolean
>>>>> org.jvnet.hk2.config.ValidationException: Validation Failed: force
>> is
>>>>> not of data type: java.lang.Boolean
>>>>>
>>>>> Command set failed.
>>>>> asadmin> set server.network-config.protocols.protocol.http-listener-1.http.compression=true
>>>>> server.network-config.protocols.protocol.http-listener-1.http.compression=true
>>>>>
>>>>> Command set executed successfully.
>>>>>
>>>>> Afterwards in the domain.xml I see >>compression="true"<<.
>>>>>
>>>>> This seems like a regression.
>>>>>
>>>>> According to:
>>>>>
>>>>> http://weblogs.java.net/blog/jfarcand/archive/2006/06/enabling_http_c_1.html
>>>>>
>>>>> compression: The Connector may use HTTP/1.1 GZIP compression in an
>>>>> attempt to save server bandwidth. The acceptable values for the
>>>>> parameter is "off" (disable compression), "on" (allow compression,
>>>>> which causes text data to be compressed), "force" (forces compression
>>>>> in all cases), or a numerical integer value (which is equivalent to
>>>>> "on", but specifies the minimum amount of data before the output is
>>>>> compressed).
>>>>>
>>>>> Felipe, can you file a bug against "configuration"?
>>>>>
>>>>> Thanks,
>>>>>
>>>>>
>>>>> Jan
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Wolfram Rittmeyer
>>>>>
>>>>>
>>>>>
>>>>> "Felipe Gaścho" <fgaucho_at_gmail.com> hat am 25. Oktober 2009 um 15:29
>>>>> geschrieben:
>>>>>
>>>>>
>>>>>> following this manual: http://docs.sun.com/app/docs/doc/820-4507/abhco?a=view
>>>>>>
>>>>>> the "http-listener" should be under the http-service element,
>> right
>>>> ?
>>>>
>>>>>> <configs>
>>>>>> <config name="server-config">
>>>>>> <http-service>
>>>>>> <access-log />
>>>>>> <virtual-server id="server"
>>>>>> network-listeners="http-listener-1,http-listener-2" />
>>>>>> <virtual-server id="__asadmin"
>>>> network-listeners="admin-listener" />
>>>>
>>>>>> <http-listener>
>>>>>> <property name="compression" value="force"/>
>>>>>> <property name="compressableMimeType"
>>>>>> value="text/html,text/xml,text/plain,image/gif,image/jpeg,image/png,text/css,text/javascript,application/json,application/xml"/>
>>>>>> </http-listener>
>>>>>> </http-service>
>>>>>> ...
>>>>>>
>>>>>> and nothing happens.. what is missed ?
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>>>>>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: quality-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: quality-help_at_glassfish.dev.java.net
>>>
>>>
>>>