Jeanfrancois Arcand wrote:
> Salut,
>
> Vivek Pandey wrote:
>> Oleksiy Stashok wrote:
>>> Hi,
>>>
>>>>> Hi guys,
>>>>>
>>>>> just updated
>>>>> https://glassfish.dev.java.net/issues/show_bug.cgi?id=5951
>>>>>
>>>>> actually it was just one devtest run, where this test failed, but
>>>>> seems there were some side reasons of the fail. Since 5.09.2008
>>>>> this test is passing fine.
>>>>>
>>>>> As I mentioned before, currently in Grizzly each GrizzlyAdapter
>>>>> has own chunking processing logic. It is not centralized.
>>>>>
>>>>> For v3 it's not so easy to make chunking centralized. Because at
>>>>> the startup Grizzly may not even know about all the Adapters
>>>>> existed... Adapters could be registered at the runtime.
>>>>>
>>>> Right, adapters are registered at runtime, I am registering
>>>> RailsAdapter inside Deployer.load(). Since http listener knows
>>>> about each adapter registered, can it not apply setting that it
>>>> knows from the domain.xml? Looks like if you could set the chunking
>>>> behavior dynamically for each registered adapters would be the way
>>>> to go. The reason I say this is because HttpListner is the only
>>>> entity and GrizzlyAdapters handle req/resp but the global
>>>> properties should be enforced by the http-listner.
>>> Well, currently there is no even mechanism to get all the registered
>>> adapters. Currently we have mapper (URL <-> Adapter), which returns
>>> the adapter for the specific URL.
>>> Another point... What if we want to register the single Adapter on
>>> several GrizzlyProxies (different http-listeners), which settings
>>> should be applied in this case?
>> Is it not true that each http listener has a corresponding setting in
>> domain.xml?
>
> Yes.
>
>>
>>> Looks like the best solution would be move the chunking logic
>>> outside the Adapter. But not sure this could be done for prelude.
>>>
>
> Hum....chunking is enabled at the Request/Response level...it has
> nothing to do with Adapter :-) I'm not sure I follow about moving this
> out of the Adapter...it is already out (created in
> DefaultProcessorTask). What needs to be done here is the JRubyAdapter
> must call:
>
> GrizzlyResponse.setChunkingEnabled(false);
>
> on every request, hence the http-listener configuration is never taken
> into account. Now this API is not exposed with the current Grizzly
> version, hence some work for me today :-) I will file an issue in
> Grizzly so next Grizzly integration will contains what you need.
The API is good but I am not sure I follow this for the issue I am
dealing with here. Are you saying keep the chunking disabled by default?
This is going to result into poor performance for large data transfer.
In my view the fix should be done thru some kind of configuration to
disable chunking not other way round and for that http-listener
configuration is the right place to do so.
-vivek.