Chunked responses

V

Veerle

Hi,

We are using Axis 1.0 on a JRun web server on linux for a new created
webservice. When the webservice sends a gzipped response, it is
automatically chunked as well. I understand that is the consequence of
http/1.1 where chunks are the default. We need the http/1.1 but our
client app cannot handle the chunks, so we need a regular unchunked
reponse. Any thoughts on how to accomplish this? Is it something we
can configure in server-config.wsdd, or somewhere else?

Strange thing is, if we install a JRun web server on our pc (Win XP)
and try the same thing then we don't have chunks at all...

Veerle
 
R

Roedy Green

Strange thing is, if we install a JRun web server on our pc (Win XP)
and try the same thing then we don't have chunks at all...

If you can get down low enough, chunking is controlled with:

HttpURLConnection.setChunkedStreamingMode( 4096 );

The default is 4096 chunksize.

--
Roedy Green Canadian Mind Products
http://mindprod.com

"It wasn’t the Exxon Valdez captain’s driving that caused the Alaskan oil spill. It was yours."
~ Greenpeace advertisement New York Times 1990-02-25
 
V

Veerle

...so you can't really have a genuine HTTP/1.1 client that doesn't
understand 'chunked'.

The client app has a bug that prevents chunked responses from being
unzipped correctly.
What control do you have over the client app?  Can you force it to use
HTTP/1.0?  What other aspect of HTTP/1.1 do you need?

We use some aspects of HTTP/1.1 so we cannot downgrade the client
application to HTTP/1.0

The only 2 differences between running the web server locally and
running it on the linux server are:
- locally = Win XP ; server = Linux (same version of JRun)
- Linux server has an Apache installed as well
My guess is that the Apache is responsible for doing the chunking, but
I cannot find why and how to prevent it
 
L

Lew

Veerle said:
The client app has a bug that prevents chunked responses from being
unzipped correctly.


We use some aspects of HTTP/1.1

Yeah, like chunked responses.
so we cannot downgrade the client application to HTTP/1.0

The only 2 differences between running the web server locally and
running it on the linux server are:
- locally = Win XP ; server = Linux (same version of JRun)
- Linux server has an Apache installed as well
My guess is that the Apache is responsible for doing the chunking, but
I cannot find why and how to prevent it

I'm certain that it is not wise to program to accommodate a bug. Someone will
eventually fix the bug. The only correct approach to bugs is to fix them.
 
T

Tom Anderson

The client app has a bug that prevents chunked responses from being
unzipped correctly.

Okay, so it's broken. It would be better to put resources into fixing it.
This may not be practical for political reasons, of course.
We use some aspects of HTTP/1.1 so we cannot downgrade the client
application to HTTP/1.0

The only 2 differences between running the web server locally and
running it on the linux server are:
- locally = Win XP ; server = Linux (same version of JRun)
- Linux server has an Apache installed as well
My guess is that the Apache is responsible for doing the chunking, but
I cannot find why and how to prevent it

So hang on, are you using JRun behind Apache, via ajp12 or whatever, or
using its own web server, like Tomcat or something?

If the former, then yes, you need to look into the Apache docs to find out
how to switch off chunking.

If the latter, the only thing that springs to mind is that the default
socket send buffer sizes might be different. If they are, it's possible
that the HTTP server's own servlet output buffers are different sizes
(being sized to fit the TCP buffers). My understanding is that web servers
switch from solid to chunked encoding when (a) they haven't been given a
content-length upfront and (b) they've been given more than a buffer-full
of data. So, different socket buffer sizes might (*might* - this is
speculation!) lead to the onset of chunking at a different output size.
How big is your output, and do you consistently see chunking on linux, or
is it intermittent?

tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top