Lines 908-913
Link Here
|
908 |
} |
908 |
} |
909 |
} |
909 |
} |
910 |
|
910 |
|
|
|
911 |
boolean doBreak = false; |
912 |
|
913 |
// Do sendfile as needed: add socket to sendfile and end |
914 |
if (sendfileData != null && !error) { |
915 |
KeyAttachment ka = (KeyAttachment)socket.getAttachment(false); |
916 |
ka.setSendfileData(sendfileData); |
917 |
sendfileData.keepAlive = keepAlive; |
918 |
SelectionKey key = socket.getIOChannel().keyFor(socket.getPoller().getSelector()); |
919 |
//do the first write on this thread, might as well |
920 |
openSocket = socket.getPoller().processSendfile(key,ka,true); |
921 |
doBreak = true; |
922 |
} |
923 |
|
911 |
// Finish the handling of the request |
924 |
// Finish the handling of the request |
912 |
if (!comet) { |
925 |
if (!comet) { |
913 |
endRequest(); |
926 |
endRequest(); |
Lines 925-942
Link Here
|
925 |
inputBuffer.nextRequest(); |
938 |
inputBuffer.nextRequest(); |
926 |
outputBuffer.nextRequest(); |
939 |
outputBuffer.nextRequest(); |
927 |
} |
940 |
} |
928 |
|
|
|
929 |
// Do sendfile as needed: add socket to sendfile and end |
930 |
if (sendfileData != null && !error) { |
931 |
KeyAttachment ka = (KeyAttachment)socket.getAttachment(false); |
932 |
ka.setSendfileData(sendfileData); |
933 |
sendfileData.keepAlive = keepAlive; |
934 |
SelectionKey key = socket.getIOChannel().keyFor(socket.getPoller().getSelector()); |
935 |
//do the first write on this thread, might as well |
936 |
openSocket = socket.getPoller().processSendfile(key,ka,true); |
937 |
break; |
938 |
} |
939 |
|
941 |
|
|
|
942 |
if (doBreak) { |
943 |
break; |
944 |
} |
940 |
|
945 |
|
941 |
rp.setStage(org.apache.coyote.Constants.STAGE_KEEPALIVE); |
946 |
rp.setStage(org.apache.coyote.Constants.STAGE_KEEPALIVE); |
942 |
|
947 |
|