Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@apache.org Received: (qmail 4644 invoked from network); 11 Dec 2002 16:36:23 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 11 Dec 2002 16:36:23 -0000 Received: (qmail 18987 invoked by uid 97); 11 Dec 2002 16:36:56 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-dev@jakarta.apache.org Received: (qmail 18824 invoked by uid 97); 11 Dec 2002 16:36:54 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Developers List" Reply-To: "Tomcat Developers List" Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 18525 invoked by uid 98); 11 Dec 2002 16:36:50 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) From: =?iso-8859-1?Q?Joakim_Str=F6m?= To: "Tomcat Developers List" Subject: [PATCH] mod_jk2 for IIS, Bugfix corrupted data Date: Wed, 11 Dec 2002 17:35:25 +0100 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_000A_01C2A13B.B0308F30" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N ------=_NextPart_000_000A_01C2A13B.B0308F30 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, Find attached my fix that solves this problem: Data uploaded from a client occasionally gets corrupted by the isapi_redirector2 filter, if the length of the data exceeds approximately 56k bytes. A word of warning is appropriate here: The fix is in the common part of jk2 but I have only tested on IIS, where it does the job. The fix is from v. 1.27 of jk/native2/common/jk_requtil.c Please bear with me if I made some mistake using the diff command--I'm neither from the Unix nor freeware world. Regards, Joakim Strom ------=_NextPart_000_000A_01C2A13B.B0308F30 Content-Type: text/plain; name="jk_requtil-bugfix.txt" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="jk_requtil-bugfix.txt" --- jk/native2/common/jk_requtil.c.orig 2002-12-11 16:52:47.000000000 = +0100=0A= +++ jk/native2/common/jk_requtil.c 2002-12-11 17:04:30.000000000 +0100=0A= @@ -434,7 +434,8 @@=0A= unsigned len)=0A= {=0A= unsigned rdlen =3D 0;=0A= - unsigned padded_len =3D len;=0A= + unsigned padded_len =3D len; + long content_read =3D s->content_read; /* save input value */=0A= =0A= if (s->is_chunked && s->no_more_chunks) {=0A= return 0;=0A= @@ -453,8 +454,9 @@=0A= unsigned this_time =3D 0;=0A= if(s->read(env, s, buf + rdlen, len - rdlen, &this_time)) {=0A= return -1;=0A= - }=0A= -=0A= + } + s->content_read +=3D this_time; /* make sure content_read always gets = incremented */ + =0A= if(0 =3D=3D this_time) {=0A= if (s->is_chunked) {=0A= s->no_more_chunks =3D 1; /* read no more */=0A= @@ -462,7 +464,8 @@=0A= break;=0A= }=0A= rdlen +=3D this_time;=0A= - }=0A= + } + s->content_read =3D content_read; /* reset */=0A= =0A= return (int)rdlen;=0A= }=0A= ------=_NextPart_000_000A_01C2A13B.B0308F30 Content-Type: text/plain; charset=us-ascii -- To unsubscribe, e-mail: For additional commands, e-mail: ------=_NextPart_000_000A_01C2A13B.B0308F30--