Re-enabled the old code with the new fix for the SSL failure.

This commit is contained in:
wcrisman
2014-07-18 14:30:59 -07:00
parent 06b0525f6d
commit 1147864416

View File

@@ -1275,7 +1275,7 @@ public class WebServer {
if(result && pendingOutboundMessage != null) {
//Check to see if the outbound message is prepared to send more content. For chunked transfers the outbound message may be waiting for additional content from another stream and we should return later.//
if(result && !pendingOutboundMessage.getBuffer().hasRemaining()) {
/*
if(!pendingOutboundMessage.loadBuffer()) {
if(pendingOutboundMessage.getBuffer() == null && pendingOutboundMessage.getNext() != null) {
pendingOutboundMessage = pendingOutboundMessage.getNext();
@@ -1289,13 +1289,14 @@ public class WebServer {
pendingOutboundMessage = null;
lastAddedMessageBuffer = null;
}//if//
/*
*/
//Attempt to load additional message bytes into the buffer.//
boolean couldLoadAdditionalBytes = pendingOutboundMessage.loadBuffer();
//The buffer will be set to null if there are no more bytes to be read from the stream (ever).//
if(pendingOutboundMessage.getBuffer() == null) {
//Note that the buffer could be null, but we have more bytes to be written.//
if(!couldLoadAdditionalBytes && pendingOutboundMessage.getBuffer() == null) {
//Load the next pending outbound message in the chain. This is currently only used for content being passed through to another process via a second socket.//
if(pendingOutboundMessage.getNext() != null) {
pendingOutboundMessage = pendingOutboundMessage.getNext();
@@ -1312,7 +1313,7 @@ public class WebServer {
//Wait until additional message bytes are available.//
result = false;
}//else if//
*/
}//if//
//If we have an application response pending then send it now.//
@@ -1385,12 +1386,13 @@ public class WebServer {
//Add more content to the buffer.//
//Note: Do this even if the last encrypted write buffer could not be fully sent - so that when it is sent there will be outbound message content.//
if(key.channel().isOpen() && pendingOutboundMessage != null) {
/*
//Attempt to load additional message bytes into the buffer.//
boolean couldLoadAdditionalBytes = pendingOutboundMessage.loadBuffer();
//The buffer will be set to null if there are no more bytes to be read from the stream (ever).//
if(pendingOutboundMessage.getBuffer() == null) {
//Note that the buffer could be null, but we have more bytes to be written.//
if(!couldLoadAdditionalBytes && pendingOutboundMessage.getBuffer() == null) {
//Load the next pending outbound message in the chain. This is currently only used for content being passed through to another process via a second socket.//
if(pendingOutboundMessage.getNext() != null) {
pendingOutboundMessage = pendingOutboundMessage.getNext();
@@ -1407,7 +1409,7 @@ public class WebServer {
//Wait until additional message bytes are available.//
result = false;
}//else if//
*/
/*
if(!pendingOutboundMessage.loadBuffer()) {
//Load the next pending outbound message in the chain. This is currently only used for content being passed through to another process via a second socket.//
@@ -1425,6 +1427,7 @@ public class WebServer {
pendingOutboundMessage = null;
lastAddedMessageBuffer = null;
}//if//
*/
}//if//
}//while//
}//if//
@@ -1444,6 +1447,7 @@ public class WebServer {
result = false;
}//if//
else {
/*
if(!pendingOutboundMessage.loadBuffer()) {
//Load the next pending outbound message in the chain. This is currently only used for content being passed through to another process via a second socket.//
if(pendingOutboundMessage.getBuffer() == null && pendingOutboundMessage.getNext() != null) {
@@ -1460,13 +1464,14 @@ public class WebServer {
pendingOutboundMessage = null;
lastAddedMessageBuffer = null;
}//if//
/*
*/
//Attempt to load additional message bytes into the buffer.//
boolean couldLoadAdditionalBytes = pendingOutboundMessage.loadBuffer();
//The buffer will be set to null if there are no more bytes to be read from the stream (ever).//
if(pendingOutboundMessage.getBuffer() == null) {
//Note that the buffer could be null, but we have more bytes to be written.//
if(!couldLoadAdditionalBytes && pendingOutboundMessage.getBuffer() == null) {
//Load the next pending outbound message in the chain. This is currently only used for content being passed through to another process via a second socket.//
if(pendingOutboundMessage.getNext() != null) {
pendingOutboundMessage = pendingOutboundMessage.getNext();
@@ -1483,7 +1488,7 @@ public class WebServer {
//Wait until additional message bytes are available.//
result = false;
}//else if//
*/
}//else//
}//while//
}//else//