Hello,
I'm a wso2 esb (synapse) user/developer.
I got a problem with https nio transport.
I tried versions 4.1 alpha1 and 4.1 beta2.
The problem:
transport failed to receive large (50k) response through nio https.
The connection is keep-alive and chunked. Every time I received only response
divisible
by 8192 and last chunk is never returned.
After digging the logs and code I found that last chunk not returned because
of the code in this class org.apache.http.impl.nio.reactor.SSLIOSession.java
I changed one line in the code and now it's working.
Now I want to ask somebody who knows the code if this change is ok,
and maybe it should be applied to httpcore:
public synchronized boolean isAppInputReady() throws IOException {
int bytesRead = receiveEncryptedData();
if (bytesRead == -1) {
this.endOfStream = true;
}
doHandshake();
decryptData();
// CHANGED CODE:
return (this.appEventMask & SelectionKey.OP_READ) > 0
&& (this.inPlain.position() > 0 || (this.endOfStream && this.status ==
ACTIVE)
||
this.appBufferStatus.hasBufferedInput() );
// ORIGINAL CODE:
//return (this.appEventMask & SelectionKey.OP_READ) > 0
// && (this.inPlain.position() > 0 || (this.endOfStream && this.status
== ACTIVE));
}
--
Regards,
Dmitry
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]