costin 2003/02/17 08:24:31 Modified: jk/native/common jk_ajp_common.c Log: Added more info to the log - the return code. It may help debug problems. Revision Changes Path 1.34 +17 -16 jakarta-tomcat-connectors/jk/native/common/jk_ajp_common.c Index: jk_ajp_common.c =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_ajp_common.c,v retrieving revision 1.33 retrieving revision 1.34 diff -u -r1.33 -r1.34 --- jk_ajp_common.c 21 Nov 2002 17:53:48 -0000 1.33 +++ jk_ajp_common.c 17 Feb 2003 16:24:31 -0000 1.34 @@ -678,7 +678,7 @@ rc = jk_tcp_socket_recvfull(ae->sd, head, AJP_HEADER_LEN); if(rc < 0) { - jk_log(l, JK_LOG_ERROR, "ERROR: can't receive the response message from tomcat, network problems or tomcat is down.\n"); + jk_log(l, JK_LOG_ERROR, "ERROR: can't receive the response message from tomcat, network problems or tomcat is down. err=%d\n", rc); return JK_FALSE; } @@ -721,7 +721,7 @@ rc = jk_tcp_socket_recvfull(ae->sd, jk_b_get_buff(msg), msglen); if(rc < 0) { - jk_log(l, JK_LOG_ERROR, "ERROR: can't receive the response message from tomcat, network problems or tomcat is down\n"); + jk_log(l, JK_LOG_ERROR, "ERROR: can't receive the response message from tomcat, network problems or tomcat is down %d\n", rc); return JK_FALSE; } @@ -975,26 +975,27 @@ case JK_AJP13_GET_BODY_CHUNK: { - int len = (int)jk_b_get_int(msg); + int len = (int)jk_b_get_int(msg); + if(len < 0) { + len = 0; + } if(len > AJP13_MAX_SEND_BODY_SZ) { len = AJP13_MAX_SEND_BODY_SZ; } - if(len > ae->left_bytes_to_send) { + if((unsigned int)len > ae->left_bytes_to_send) { len = ae->left_bytes_to_send; } - if(len < 0) { - len = 0; - } - - /* the right place to add file storage for upload */ - if ((len = ajp_read_into_msg_buff(ae, r, pmsg, len, l)) >= 0) { - r->content_read += len; - return JK_AJP13_HAS_RESPONSE; - } - jk_log(l, JK_LOG_ERROR, "ERROR reading POST data from client. Connection aborted or network problems\n"); - return JK_INTERNAL_ERROR; + /* the right place to add file storage for upload */ + if ((len = ajp_read_into_msg_buff(ae, r, pmsg, len, l)) >= 0) { + r->content_read += len; + return JK_AJP13_HAS_RESPONSE; + } + + jk_log(l, JK_LOG_ERROR, "ERROR reading POST data from client. " + "Connection aborted or network problems\n"); + return JK_INTERNAL_ERROR; } break;
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]