cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Unico Hommes" <Un...@hippo.nl>
Subject RE: custom protocol issue
Date Wed, 04 Feb 2004 23:34:29 GMT

Faron Dutton wrote:
> 
> Hi all,
> 
> I have implemented a custom SourceFactory and Source for 
> handling encrypted resources. The EncryptedSourceFactory 
> replaces o.a.e.s.i.ResourceSourceFactory and creates 
> EncryptedSource objects. The EncryptedSource object looks for 
> a special marker at the head of the input stream. If this 
> marker is present then it returns a 
> javax.crypto.CipherInputStream otherwise it returns the 
> underlying InputStream. I have bench-marked the throughput 
> and it averages about 40msec per file on my box.
> 
> Life would be grand if the story ended there, however it 
> doesn't. Even though the decryption time is only 40msec, it 
> takes around 20sec to completely process the page. If I use 
> unencrypted pages the total time is only about 250msec.
> 
> I have inserted tcpmon (from the Axis project) between the 
> browser and the server and it appears that the output stream 
> is not finished even though I can see that the response is 
> complete (I see a closing root tag). After the 20sec are up, 
> the stream closes and the browser requests the next item. All 
> of these add up to several minutes before the page is displayed.
> 
> Does anyone have a clue what might be happening. I have been 
> working on this all day and I at a loss as to what my next 
> step might be.
> 

It sounds a lot like behavior you will see due to a wrong value for
content-length header. You should be able to verify whether this is the
case by returning -1 from getContentLength method.

Unico

Mime
View raw message