Finished fixing the bug in the last two commits where by the content filling the buffer was causing major problems with the resulting client display (not sure why and don't care).
This commit is contained in:
@@ -304,24 +304,12 @@ private void prepareResponse(Response response) {
|
|||||||
Debug.log(ch.toString());
|
Debug.log(ch.toString());
|
||||||
}//if//
|
}//if//
|
||||||
|
|
||||||
//Ignore the content if we are only accessing the header.//
|
|
||||||
// if(content != null && request.getRequestType() != Request.TYPE_HEAD) {
|
|
||||||
// content.get(buffer);
|
|
||||||
// }//if//
|
|
||||||
|
|
||||||
//Save the buffer as the current pending outbound message for this socket context.//
|
//Save the buffer as the current pending outbound message for this socket context.//
|
||||||
//currentOutboundMessage = new MessageBuffer(buffer, response, content != null && request.getRequestType() != Request.TYPE_HEAD ? content : null);
|
|
||||||
// queueOutboundClientMessage(new MessageBuffer(buffer, response, content != null && request.getRequestType() != Request.TYPE_HEAD ? content : null));
|
|
||||||
setBuffer(buffer);
|
setBuffer(buffer);
|
||||||
|
|
||||||
if(content != null && request.getRequestType() != Request.TYPE_HEAD) {
|
if(content != null && request.getRequestType() != Request.TYPE_HEAD) {
|
||||||
this.content = content;
|
this.content = content;
|
||||||
}//if//
|
}//if//
|
||||||
|
|
||||||
//Fill the remaining buffer space with the content.//
|
|
||||||
if(this.content != null) {
|
|
||||||
this.content.get(buffer);
|
|
||||||
}//if//
|
|
||||||
}//try//
|
}//try//
|
||||||
catch(Throwable e) {
|
catch(Throwable e) {
|
||||||
Debug.log("Fatal Error: Failed to build and send the response message due to an exception.", e);
|
Debug.log("Fatal Error: Failed to build and send the response message due to an exception.", e);
|
||||||
|
|||||||
Reference in New Issue
Block a user