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=15278>.
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=15278

[PATCH] mod_jk2 for IIS, Bugfix corrupted data ]

           Summary: [PATCH] mod_jk2 for IIS, Bugfix corrupted data ]
           Product: Tomcat 4
           Version: 4.1.12
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Connector:Other
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


Bugfix 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




--- jk/native2/common/jk_requtil.c.orig 2002-12-11 16:52:47.000000000 +0100
+++ jk/native2/common/jk_requtil.c      2002-12-11 17:04:30.000000000 +0100
@@ -434,7 +434,8 @@
                          unsigned  len)
 {
     unsigned rdlen = 0;
-    unsigned padded_len = len;
+    unsigned padded_len = len;
+       long content_read = s->content_read; /* save input value */
 
     if (s->is_chunked && s->no_more_chunks) {
        return 0;
@@ -453,8 +454,9 @@
         unsigned this_time = 0;
         if(s->read(env, s, buf + rdlen, len - rdlen, &this_time)) {
             return -1;
-        }
-
+        }
+               s->content_read += this_time; /* make sure content_read always 
gets incremented */
+               
         if(0 == this_time) {
            if (s->is_chunked) {
                s->no_more_chunks = 1; /* read no more */
@@ -462,7 +464,8 @@
             break;
         }
         rdlen += this_time;
-    }
+    }
+       s->content_read = content_read; /* reset */
 
     return (int)rdlen;
 }

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to