You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2001/12/07 03:54:44 UTC

DO NOT REPLY [Bug 4223] - AJP13 connectors InputStream newer returns -1

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4223>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4223

AJP13 connectors InputStream newer returns -1





------- Additional Comments From seguin@motive.com  2001-12-06 18:54 -------
it think this bug might actually be a bug in the jk layer...

in ajp_process_callback, here is the block of code that handles sending the
next chunk of data from the webserver to tomcat:

--- snip ---
        case JK_AJP13_GET_BODY_CHUNK:
            {
		unsigned len = (unsigned)jk_b_get_int(msg);
                jk_log(l, JK_LOG_DEBUG, "received JK_AJP13_GET_BODY_CHUNK,
len=%d\n", len);

                if(len > AJP13_MAX_SEND_BODY_SZ) {
                    len = AJP13_MAX_SEND_BODY_SZ;
                }
                if(len > ae->left_bytes_to_send) {
                    jk_log(l, JK_LOG_DEBUG, "len > ae->left_bytes_to_send
(%d > %d)\n",
                           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, msg, len, l)) >= 0)
{
		    r->content_read += len;
		    return JK_AJP13_HAS_RESPONSE;
		}                  

		jk_log(l, JK_LOG_ERROR, "Error ajp_process_callback -
ajp_read_into_msg_buff failed\n");
		return JK_INTERNAL_ERROR;	    
            }
	    break;
--- end snip ---

in this line:

  if ((len = ajp_read_into_msg_buff(ae, r, msg, len, l)) >= 0){

shouldn't pmsg (the post message) be read into, not msg?  i don't know the code 
well enough to be sure....

anyway, i was running into a problem with an infinite loop in the ajp layer.
when i made this change, the problem went away.

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>