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

Tiaan tagdev at gmail.com
Mon Nov 16 15:09:07 EST 2009


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?

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20091116/74851e60/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Mono-WebServer-FastCgi-NameValuePair.patch
Type: application/octet-stream
Size: 494 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20091116/74851e60/attachment.obj 


More information about the Mono-devel-list mailing list