hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: Long receive time for chunked ssl response
Date Wed, 13 May 2009 19:26:32 GMT
Scott Willey wrote:
> Processing a chunked SSL response of 221 characters, I found I was waiting over three
seconds for the entire response to be read. Upon investigation, this appears to be happening
because the decrypt method in SSLIOSession does not decrypt everything in the encrypted buffer
at one go. Because of this, portions of my response didn't get processed via the processing
of the events, but rather via the BaseIOReactor's validate method which means I experienced
multiple select interval timeouts prior to the message being fully processed. In reviewing
the java nio documentation for the unwrap method of the sslEngine, the comments in the javadoc
state: "This method will attempt to consume one complete SSL/TLS network packet". It appears
that one time through the decrypt method decrypted small packets with almost no data in them,
leaving encrypted data waiting. As an experiment, I changed the code in isAppInputReady in
SSLIOSession to call decrypt in a loop until everything in the en
crypted buffer was processed and bingo the response processed in under 5ms.
> I was surprised not to find any other comments on this topic. Perhaps I simply a related
topic somewhere? In any case, I'd be curious to know what the "correct" solution to this problem
> Thank you very much
> Scott

Hi Scott

This does sound like an issue with SSLIOSession. Could please raise a 
JIRA for it?


You are also very welcome to attach your local changes as a patch to the 
JIRA ticket. If the server is publicly accessible could you please let 
me know the URL I could use to reproduce the problem?



To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org

View raw message