Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Chunked responses

Reply
Thread Tools

Chunked responses

 
 
Veerle
Guest
Posts: n/a
 
      05-18-2009
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
 
Reply With Quote
 
 
 
 
Roedy Green
Guest
Posts: n/a
 
      05-19-2009
On Mon, 18 May 2009 08:11:50 -0700 (PDT), Veerle
<> wrote, quoted or indirectly quoted someone
who said :

>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
 
Reply With Quote
 
 
 
 
Veerle
Guest
Posts: n/a
 
      05-19-2009
On 18 mei, 17:50, Steven Simpson <s...@domain.invalid> wrote:
> ...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

 
Reply With Quote
 
Lew
Guest
Posts: n/a
 
      05-19-2009
Veerle wrote:
> On 18 mei, 17:50, Steven Simpson <s...@domain.invalid> wrote:
>> ...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


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.

--
Lew
 
Reply With Quote
 
Tom Anderson
Guest
Posts: n/a
 
      05-19-2009
On Tue, 19 May 2009, Veerle wrote:

> On 18 mei, 17:50, Steven Simpson <s...@domain.invalid> wrote:
>> ...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.


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.

>> 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


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

--
Our only chance for survival is better engineering. -- James Dyson
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Chunked GZIP processing using Java Sockets aztechnology@gmail.com Java 10 03-29-2006 07:26 AM
Re: httplib raises ValueError reading chunked content Philip Semanchuk Python 0 03-09-2006 02:00 AM
httplib raises ValueError reading chunked content philip20060308@gmail.com Python 0 03-08-2006 11:21 PM
HttpURLConnection receiving chunked encoded responses d_cymbal@hotmail.com Java 0 04-13-2005 09:02 PM
transfer encoding: chunked CW ASP .Net 0 02-15-2005 09:41 AM



Advertisments