[Mono-dev] [PATCH] XSP: Encoding of long string-lengths in FastCGI does not comply with specification

Marek Habersack grendel at twistedcode.net
Tue Nov 17 05:23:15 EST 2009


Tiaan wrote:
> The lengths of strings that are larger than 127 bytes are encoded 
> incorrectly by the Mono.FastCgi.NameValuePair.WriteLength method: The 
> first byte must have its high bit set in this case.  To confirm, refer 
> to the implementation of the reverse decoding-logic in the ReadLength 
> method and see the FastCGI specification (section 3.4 on Name-Value 
> Pairs): “The high-order bit of the first byte of a length indicates the 
> length's encoding. A high-order zero implies a one-byte encoding, a one 
> a four-byte encoding.”
> 
>  
> 
> The attached patch fixes this bug on the trunk.  Would someone please 
> check and commit it?
Committed to trunk (r146328), 2.6 (r146329) and 2.4 (r146330), thanks a lot!

marek


More information about the Mono-devel-list mailing list