There are socket descriptor validity checks in ajp_reset_endpoint and ajp_done (ajp_common.c) that don't use the IS_VALID_SOCKET macro, but rather do a sd > 0 check for validity. On XP/Visual Studio 2005 (at least), SOCKET is an unsigned, which means sd > 0 always succeeds. This doesn't break anything at the moment, since the subsequent code executed correctly checks for invalid sockets before attempting to close them. Patch is attached to correct this, as well as add a bit more debug logging around the AJP responses.
Created attachment 19121 [details] Patch to correct socket descriptor checks and add debug logging for AJP responses
Committed. Thanks!
Move a couple of fixed JK issues from resolved to closed.