users@grizzly.java.net

Re: grizzly 1.9.33 issues

From: Oleksiy Stashok <oleksiy.stashok_at_oracle.com>
Date: Tue, 12 Apr 2011 17:00:03 +0200

Rama, one more thing, didn't catch you use FireFox4, can you pls. try
the same with 3.x?

Thanks.

Alexey.

On 04/12/2011 04:27 PM, Oleksiy Stashok wrote:
> Hi Rama,
>
> can you pls. try the same with 1.9.34 snapshot built from source?
> I'm trying that locally and see the correct response headers:
>
> Content-Type |text/html;charset=ISO-8859-1|
> Transfer-Encoding |chunked|
> Content-Encoding |gzip|
> Vary |Accept-Encoding|
> Date |Tue, 12 Apr 2011 14:25:26 GMT|
>
>
>
> but don't remember we changed anything since 1.9.33 release.
>
> Thanks.
>
> WBR,
> Alexey.
>
> On 04/12/2011 03:43 PM, rama.rama_at_tiscali.it wrote:
>> Hi all,
>>
>> i have a couple of issue with gws http version 1.9.33
>>
>>
>> with
>> this test case*
>>
>>
>> i wasn't able to get
>> -contenttype
>> -compression (maybe
>> due to content type?)
>>
>> on firefox4, safari5 with debug window (firebug
>> or watever) i can see
>>
>>
>> REQUEST
>> Host 192.168.2.123:7777
>> User-Agent
>> Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; it; rv:1.9.2.16)
>> Gecko/20110319 Firefox/3.6.16
>> Accept text/html,application/xhtml+xml,
>> application/xml;q=0.9,*/*;q=0.8
>> Accept-Language it-it,it;q=0.8,en-us;
>> q=0.5,en;q=0.3
>> Accept-Encoding gzip,deflate
>> Accept-Charset ISO-8859-1,
>> utf-8;q=0.7,*;q=0.7
>> Keep-Alive 115
>> Connection keep-alive
>> Cookie
>> sv7Paq2b=2987260110130851366.929943
>> Cache-Control max-age=0
>>
>> RESPONSE
>>
>> Content-Type text/plain; charset=iso-8859-1
>> Transfer-Encoding chunked
>>
>> Date Tue, 12 Apr 2011 13:30:31 GMT
>>
>>
>>
>>
>> and, this is the verbose output
>> of program
>> 12-apr-2011 15.41.04 com.sun.grizzly.http.SelectorThread
>> displayConfiguration
>> INFO: GRIZZLY0021: "
>> Grizzly running on Mac OS X
>> - 10.6.7 under JDK version: 1.6.0_22 - Apple Inc.
>> port: 7777
>>
>> Thread Pool: com.sun.grizzly.http.StatsThreadPool_at_50c931fc, port=7777
>>
>> Read Selector: -1
>> ByteBuffer size: 8192
>> maxHttpHeaderSize: 8192
>>
>> sendBufferSize: 131072
>> maxKeepAliveRequests: 256
>>
>> keepAliveTimeoutInSeconds: 30
>> Static File Cache enabled: true
>>
>> Static resources directory: /Users/ramarama/IdeaProject/c2_stable
>>
>> Adapter : com.sun.grizzly.tcp.http11.GrizzlyAdapterChain
>>
>> Asynchronous Request Processing enabled: false
>> 12-apr-2011 15.41.04 com.
>> sun.grizzly.Controller logVersion
>> INFO: GRIZZLY0001: Starting Grizzly
>> Framework 1.9.33 - 12/04/11 15.41
>>
>>
>>
>>
>> *
>> public class DemoWebServer {
>>
>>
>> static final AtomicInteger req = new AtomicInteger();
>>
>> public
>> static void main(String args[]) {
>>
>>
>> GrizzlyWebServer test = new
>> GrizzlyWebServer(7777,
>> "/Users/ramarama/IdeaProject/c2w_test/c2w/cert/");
>> test.
>> addGrizzlyAdapter(new MyGrizzlyAdapter(), new String[]{"/"});
>>
>> test.getSelectorThread().setDisplayConfiguration(true);
>> test.
>> getSelectorThread().setCompression("on");
>>
>> try {
>>
>> test.start();
>> } catch (IOException e) {
>> e.
>> printStackTrace(); //To change body of catch statement use File |
>> Settings | File Templates.
>> }
>> while (true) {
>>
>> try {
>> Thread.sleep(20500);
>> } catch
>> (Exception e) {
>>
>> }
>> }
>> }
>>
>>
>> static class
>> MyGrizzlyAdapter extends GrizzlyAdapter {
>> public
>> MyGrizzlyAdapter() {
>> this.setHandleStaticResources(false);
>>
>> }
>>
>> public void service(GrizzlyRequest grizzlyRequest,
>> GrizzlyResponse grizzlyResponse) {
>> try {
>>
>> StringBuilder someJunk = new StringBuilder();
>>
>> grizzlyResponse.setContentType(MimeType.get("html"));
>>
>>
>>
>> someJunk.append("junk<br>");
>>
>> for (int i = 0;i<10;i++)
>> someJunk.append(someJunk);
>> grizzlyResponse.getWriter().
>> print(someJunk);
>>
>>
>>
>> req.incrementAndGet();
>>
>> } catch (IOException e) {
>>
>> }
>> }
>> }
>>
>>
>> }
>>
>>
>>
>>
>> Non temiamo alcun confronto: Tiscali ha l'Adsl più veloce d'Italia! Risparmia con Tutto Incluso Light: Voce + Adsl 20 mega a soli 17,95 € al mese per 12 mesi.http://abbonati.tiscali.it/telefono-adsl/prodotti/tc/tuttoincluso_light/?WT.mc_id=01fw
>