costin@apache.org wrote:
> costin 2002/11/21 09:53:48
>
> Modified: jk/native/common jk_ajp_common.c
> Log:
> Do not send the initial chunk for chunked encoding ( only for
> regular POST ).
> Ajp13 servers ( tomcat x.y, etc ) expect this initial chunk
> only if a content-length is specified.
>
> ( this is just an initial fix - I still need to test various
> cases )
>
> Revision Changes Path
> 1.33 +10 -3 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.32
> retrieving revision 1.33
> diff -u -r1.32 -r1.33
> --- jk_ajp_common.c 30 Oct 2002 22:12:20 -0000 1.32
> +++ jk_ajp_common.c 21 Nov 2002 17:53:48 -0000 1.33
> @@ -808,7 +808,7 @@
> }
>
> if (!r->is_chunked) {
> - ae->left_bytes_to_send -= len;
> + ae->left_bytes_to_send -= len;
> }
>
> if (len > 0) {
> @@ -905,7 +905,14 @@
> * for resend if the remote Tomcat is down, a fact we will learn only
> * doing a read (not yet)
> */
> - if (s->is_chunked || ae->left_bytes_to_send > 0) {
> + /* || s->is_chunked - this can't be done here. The original protocol sends the
first
> + chunk of post data ( based on Content-Length ), and that's what the java side
expects.
> + Sending this data for chunked would break other ajp13 serers.
> +
> + Note that chunking will continue to work - using the normal read.
> + */
> +
> + if (ae->left_bytes_to_send > 0) {
> int len = ae->left_bytes_to_send;
> if (len > AJP13_MAX_SEND_BODY_SZ)
> len = AJP13_MAX_SEND_BODY_SZ;
Costin was faster than me ;)
--
To unsubscribe, e-mail: <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>
|