You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Daniel Harding <dh...@myrealbox.com> on 2002/01/10 22:16:01 UTC

[PATCH] Fix for data corruption in the Warp connector

When using the Warp connector, the read method of the stream returned by request.getInputStream() would return negative numbers for bytes greater than 0xEF. The attached patch fixes this problem.


Re: [PATCH] Fix for data corruption in the Warp connector

Posted by Daniel Rall <dl...@finemaltcoding.com>.
Hi Daniel.  Pier checked this change into jakarta-tomcat-connectors
CVS a while back.  I don't believe it's been ported to the
jakarta-tomcat-4.0 repository yet -- it really needs to be, there have
been a lot of reports of this bug (though few fixes :).

Daniel Harding <dh...@myrealbox.com> writes:

> When using the Warp connector, the read method of the stream
> returned by request.getInputStream() would return negative numbers
> for bytes greater than 0xEF. The attached patch fixes this problem.
>
>
> --- WarpRequest.java	Wed Jan  9 20:38:23 2002
> +++ WarpRequest.java.new	Wed Jan  9 20:36:00 2002
> @@ -139,7 +139,7 @@
>                  throw new IOException("Invalid WARP packet type for body");
>  
>              if (this.packet.pointer<this.packet.size)
> -                return((int)this.packet.buffer[this.packet.pointer++]);
> +                return((int)this.packet.buffer[this.packet.pointer++] & 0xFF);
>  
>              this.packet.reset();
>              this.packet.setType(Constants.TYPE_CBK_READ);

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