Skip to main content

Disabling of "Transfer-Encoding: chunked"

5 replies [Last post]
drjoke
Offline
Joined: 2008-08-19

Can this be done? I use NGINX as a front-end for Glassfish, and Transfer-Encoding: chunked appears to not be handled very well by NGINX.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
arungupta
Offline
Joined: 2003-06-13
vivekp
Offline
Joined: 2003-06-10

Which glassfish gem version are you trying? Is it 0.3.1? Other option could be that this was implemented recently and the gem that is out there does not have this fix.

We need to see whats going on, if the latest http listner code has this fix, we simply need to release another gem version. FYI, Arun has reported bug at, https://glassfish.dev.java.net/issues/show_bug.cgi?id=5585.

Pankaj Jairath

Hello,

Try adding the HTTP listener property "chunkingDisabled" to your server
configuration :

.

You can achieve this by using the admin GUI and then traversing to the
"Configuration" and selecting configuration bound to your server
instance / cluster :

"Configuration"--->--->"HTTP
Service"--->"HTTP Listeners"--->"
"---> Select "Add
Property"

OR

use the asadmin CLI :

asadmin set
.http-service.http-listener..property.chunkingDisabled=true

wherein substitute : the name of your server
instance / cluster
: http listener over
which you want to disable/enable chunking.

On a different note, did you try using Sun WebServer 7.0 which is
available for free
(http://www.sun.com/download/products.xml?id=467713d6) and you can then
use GlassFish HTTP Load Balancer plugin or the WebServer reverse proxy
for fronting as the proxy. Chunking should work well with it.

regards
Pankaj

glassfish@javadesktop.org wrote:
> Can this be done? I use NGINX as a front-end for Glassfish, and Transfer-Encoding: chunked appears to not be handled very well by NGINX.
> [Message sent by forum member 'drjoke' (drjoke)]
>
> http://forums.java.net/jive/thread.jspa?messageID=294274
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

drjoke
Offline
Joined: 2008-08-19

I am using glassfish_rails gem so I only have domain.xml to change. I tried your option, and it did nothing for me.

I will devote sometime tonight to try the real glassfish and see if that works.

Out of curiosity, can a webserver GZIP Compress a chunked response?

whartung
Offline
Joined: 2003-06-13

My gut would say "yes", as GZIP is a content type (like GIF), whereas chunking in a transfer option of HTTP. So, a compliant HTTP client should hide the chunking of the protocol from the user, and they would just see a pure GZIP data stream.