[Mono-list] mono-fastcgi-server on 64-bit os?

James Mansion james at mansionfamily.plus.com
Wed May 11 01:29:03 EDT 2011

On Wed, 11 May 2011 04:12:43 +0100, Doug <douglas.linder at gmail.com> wrote:

> This function is returning really odd values, specifically breaking this  
> and
> forcing it to hang when this code is run:

Sounds like the input stream isn't aligned any more.

> why it's not working; should the << 8 be << 16 for 64 bit?)

No. Its trying to read a network byte order 16 bit value a byte
at a time.  The byte (0-255) is extended to a 16 bit value (ushort)
and then shifted up to the high byte in that.

If you break and just look at the contents of the buffer it is
reading the byte from, I'd expect the buffer contains data that
is consistent with the value being returned.

I suspect that the problem occurs previously in processing the stream.


More information about the Mono-list mailing list